﻿package plugin.roleN.controller
{
    import com.core.*;
    import com.sh.game.consts.*;
    import com.sh.game.global.*;
    import com.sh.game.util.*;
    import consts.*;
    import flash.display.*;
    import flash.events.*;
    import flash.geom.*;
    import flash.utils.*;
    import manager.*;
    import morn.core.components.*;
    import morn.core.events.*;
    import morn.core.handlers.*;
    import plugin.component.*;
    import plugin.newvip.model.*;
    import plugin.roleN.*;
    import plugin.roleN.compoment.*;
    import plugin.roleN.model.*;
    import pluginfw.nio.*;
    import uiresource.roleui.*;
    import view.*;
    import view.appDrag.*;
    import view.uilt.*;
    import vo.*;

    public class RoleCtrl extends RoleUI implements IRoot
    {
        private var mUIBase:Role;
        private var _roleData:Object;
        private var _armsArr:Object;
        private var _baseability:Object;
        private var _buffability:Object;
        public var _vipatt:Number;
        public var _vipattstr:Number;
        private var _roleContainer:Container;
        private var role:SimpleRoleManager;
        private var _qhtzTips:String;
        private var _qhtzLv:int = 0;
        private var _jdtzTips:String;
        private var _jdtzLv:int = 0;
        private var _bstzTips:String;
        private var _bsLv:String;
        private var zlxqcfg:Object;
        private var powerSprite:PowerMove;
        private var powerSprite2:PowerMove;
        private var rolehead:Image;
        public var armrole:ArmPageUICtrl;
        public var baoshi:BaoShiCtrl;
        public var fashion:FashionCtrl;
        public var neigong:NeiGongCtrl;
        public var zhuansheng:ZhuanShengCtrl;
        public var feishen:FeiShenCtrl;
        private var _curTab:int = 0;
        public var roleBuffer:RoleBufferCtrl;
        private var _openLevel:Object;
        private var neigongGth:Box;
        private var arr:Array;
        private var taotype:Array;
        private var cfgitem:Object;
        private var horseprop:Object;
        private var wingprop:Object;
        private var zhanliArr:Array;
        private var pingjunArr:Array;
        private var _tabIndex:Array;
        private var roleLevel:int = 0;
        private var roleRein:int = 0;
        private var _zhanliid:int = 0;
        public var _isOther:Boolean = false;
        private var otherfashion:Object = null;
        private var otherSkills:Object = null;
        private var _curimg:String = null;
        private var oldPower:int = 0;
        private var moveitme:Image;
        private var itemdata:Object;
        private var _qhArr:Array;
        private var cfgrein:Object;
        private var rein:int = 0;
        private var qhtz:Object;
        private var jdtz:Object;
        private var bstz:Object;
        private var _room:Array;
        private var gzConfig:Object;
        private static const HEAD_URL:String = "assets/images/head/";

        public function RoleCtrl(param1:Role)
        {
            this._openLevel = ConfigDictionary.data.openlevel;
            this.arr = ConfigDictionary.data.armadd;
            this.taotype = ["全攻击上限", "全防御上限", "暴击", "暴击伤害", "攻速", "敏捷", "准确", "幸运", "生命", "魔法"];
            this.pingjunArr = [];
            this._tabIndex = [1, 2, 4, 5, 3, 6];
            this._qhArr = [1, 2, 9, 3, 10, 4, 5, 6, 7, 8, 15, 13, 12];
            this.qhtz = ConfigDictionary.data.qhtz;
            this.jdtz = ConfigDictionary.data.jdtz;
            this.bstz = ConfigDictionary.data.bstz;
            this._room = [0, "时装", "幻武", "帽子", "足迹", "宠物"];
            this.mUIBase = param1;
            return;
        }// end function

        public function get curTab() : int
        {
            return this._curTab;
        }// end function

        override protected function createChildren() : void
        {
            viewClassMap["uiresource.roleui.ArmPageUI"] = ArmPageUICtrl;
            viewClassMap["uiresource.roleui.ZhuanShengUI"] = ZhuanShengCtrl;
            viewClassMap["uiresource.roleui.BaoShiPageUI"] = BaoShiCtrl;
            viewClassMap["uiresource.roleui.JingMaiUI"] = NeiGongCtrl;
            viewClassMap["uiresource.roleui.FashionUI"] = FashionCtrl;
            viewClassMap["uiresource.roleui.FeishengUI"] = FeiShenCtrl;
            loadUI("Role.xml");
            this.armrole = armroleUI as ArmPageUICtrl;
            this.baoshi = baoshiUI as BaoShiCtrl;
            this.fashion = fashionUI as FashionCtrl;
            this.neigong = neigongUI as NeiGongCtrl;
            this.feishen = feishenView as FeiShenCtrl;
            this.zhuansheng = zhuanshengUI as ZhuanShengCtrl;
            return;
        }// end function

        override protected function initializeView() : void
        {
            var _loc_1:* = Control.create(RoleControl, this);
            ModelProxy.addObserver("role", _loc_1);
            ModelProxy.addObserver("zhuan", _loc_1);
            ModelProxy.addObserver("baoshi", _loc_1);
            ModelProxy.addObserver("fashion", _loc_1);
            ModelProxy.addObserver("feishen", _loc_1);
            this.roleBuffer = new RoleBufferCtrl(this);
            this.init();
            this.initEvent();
            if (Config.hexie)
            {
                txt25.text = "坐骑";
            }
            return;
        }// end function

        protected function init() : void
        {
            this.tbHandler(1);
            this.renderzlxq();
            AppDragMgr.RegisterModule(this);
            this.powerSprite = new PowerMove(2);
            this.powerSprite.x = 90;
            this.armrole.powbox.removeAllChild();
            this.armrole.powbox.addChild(this.powerSprite);
            this.powerSprite2 = new PowerMove();
            this.powerSprite2.x = 90;
            var _loc_1:* = new Sprite();
            this.armrole.addChild(_loc_1);
            _loc_1.graphics.beginFill(16777215, 0);
            _loc_1.graphics.drawRect(0, 0, 70, 150);
            _loc_1.x = 85;
            _loc_1.y = 58;
            _loc_1.addEventListener(MouseEvent.ROLL_OVER, this.spRollOverHandler);
            _loc_1.addEventListener(MouseEvent.ROLL_OUT, this.spRollOutHandler);
            var _loc_2:* = new Sprite();
            this.armrole.addChild(_loc_2);
            _loc_2.graphics.beginFill(16777215, 0);
            _loc_2.graphics.drawRect(0, 0, 70, 150);
            _loc_2.x = 145;
            _loc_2.y = 140;
            _loc_2.addEventListener(MouseEvent.ROLL_OVER, this.sp2RollOverHandler);
            _loc_2.addEventListener(MouseEvent.ROLL_OUT, this.sp2RollOutHandler);
            this._roleContainer = new Container();
            this.armrole.leftbox.addChildAt(this._roleContainer, 1);
            this._roleContainer.mouseChildren = false;
            this._roleContainer.mouseEnabled = false;
            this.armrole.leftbox.mouseEnabled = false;
            this.zhuansheng.visible = false;
            this.baoshi.visible = false;
            this.neigong.visible = false;
            this._roleContainer.x = 284;
            this._roleContainer.y = 331;
            this.rolehead = new Image();
            this.rolehead.x = 3;
            this.rolehead.y = 392;
            this.armrole.addChild(this.rolehead);
            var _loc_3:* = new Sprite();
            _loc_3.graphics.beginFill(16777215, 1);
            _loc_3.graphics.drawCircle(0, 0, 30);
            _loc_3.graphics.endFill();
            _loc_3.x = 95 + 6 - 46 - 3;
            _loc_3.y = 442 + 12 - 14 + 6;
            this.armrole.addChild(_loc_3);
            this.rolehead.mask = _loc_3;
            baoshiBox.visible = false;
            var _loc_4:* = new Output();
            PluginManager.instance.sendToBufferServer("baoshi", CMDBaoShi.Init, _loc_4);
            PluginManager.instance.sendToBufferServer("role", CMDRole.AskNeiGongInfo, _loc_4);
            this.neigongGth = new Box();
            this.neigongGth.x = -23;
            this.neigongGth.y = 129;
            this.addChild(this.neigongGth);
            var _loc_5:* = new Image("png.common.team_count");
            this.neigongGth.addChild(_loc_5);
            var _loc_6:* = new Label();
            new Label().text = "1";
            _loc_6.width = 20;
            _loc_6.font = "Simsun";
            _loc_6.stroke = "1";
            _loc_6.color = 16777215;
            _loc_6.x = 7;
            _loc_6.y = 1;
            this.neigongGth.addChild(_loc_6);
            return;
        }// end function

        protected function sp2RollOutHandler(event:MouseEvent) : void
        {
            ModelProxy.change("tips", "state", "close");
            return;
        }// end function

        protected function sp2RollOverHandler(event:MouseEvent) : void
        {
            var _loc_2:Object = null;
            if (this.armrole._Arm5 && (this.armrole["_Arm5"] as ArmItemCtrl).data)
            {
                if (int((this.armrole["_Arm5"] as ArmItemCtrl).data.itemid) <= 0)
                {
                    return;
                }
                _loc_2 = ItemObject.create((this.armrole["_Arm5"] as ArmItemCtrl).data);
                _loc_2.wear = this._isOther ? (0) : (1);
                ModelProxy.change("tips", "arm", {data:_loc_2, p:new Point(GlobalLayer.instance.root.mouseX, GlobalLayer.instance.root.mouseY)});
            }
            return;
        }// end function

        protected function spRollOutHandler(event:MouseEvent) : void
        {
            ModelProxy.change("tips", "state", "close");
            return;
        }// end function

        protected function spRollOverHandler(event:MouseEvent) : void
        {
            var _loc_2:Object = null;
            if (this.armrole._Arm1 && (this.armrole["_Arm1"] as ArmItemCtrl).data)
            {
                if (int((this.armrole["_Arm1"] as ArmItemCtrl).data.itemid) <= 0)
                {
                    return;
                }
                _loc_2 = ItemObject.create((this.armrole["_Arm1"] as ArmItemCtrl).data);
                _loc_2.wear = this._isOther ? (0) : (1);
                ModelProxy.change("tips", "arm", {data:_loc_2, p:new Point(GlobalLayer.instance.root.mouseX, GlobalLayer.instance.root.mouseY)});
            }
            return;
        }// end function

        private function renderzlxq() : void
        {
            var _loc_2:Object = null;
            if (this.zlxqcfg == null)
            {
                this.zlxqcfg = ConfigDictionary.data.zhanli;
            }
            var _loc_1:Array = [];
            for each (_loc_2 in this.zlxqcfg)
            {
                
                if (_loc_2.typename)
                {
                    _loc_1.push(_loc_2);
                }
            }
            return;
        }// end function

        private function listRender1(param1:Component, param2:int) : void
        {
            return;
        }// end function

        private function selectHandler1(param1:int) : void
        {
            return;
        }// end function

        private function listRender2(param1:Component, param2:int) : void
        {
            return;
        }// end function

        public function getMaxAdd(param1:Object) : int
        {
            var _loc_2:* = param1.level;
            var _loc_3:* = param1.cls;
            var _loc_4:* = _loc_2 + "#" + _loc_3;
            var _loc_5:int = 0;
            var _loc_6:int = 0;
            var _loc_7:int = 0;
            var _loc_8:int = 0;
            var _loc_9:int = 1;
            while (_loc_9 <= param1.superlevel)
            {
                
                _loc_5 = _loc_5 + Math.max(int(this.arr[_loc_4].attadd * (1 + (_loc_9 - 1) * this.getpiancha(_loc_2))), 1);
                _loc_6 = _loc_6 + Math.max(int(this.arr[_loc_4].defadd * (1 + (_loc_9 - 1) * this.getpiancha(_loc_2))), 1);
                _loc_7 = _loc_7 + int(this.arr[_loc_4].hpadd * (1 + (_loc_9 - 1) * this.getpiancha(_loc_2)));
                _loc_8 = _loc_8 + int(this.arr[_loc_4].mpadd * (1 + (_loc_9 - 1) * this.getpiancha(_loc_2)));
                _loc_9++;
            }
            return _loc_5 + _loc_6 * 0.6 + _loc_7 / 5 + _loc_8 / 15;
        }// end function

        private function getpiancha(param1:int) : Number
        {
            var _loc_2:Number = 0.2;
            return 1;
        }// end function

        private function tiaozhuanHandler(param1:Object) : void
        {
            var _loc_2:String = null;
            var _loc_3:int = 0;
            var _loc_4:Array = null;
            if (param1.link)
            {
                _loc_3 = UserData.getUserData("level");
                if (_loc_3 < int(param1.level))
                {
                    ItemUilt.ErrortipsForLevel(param1.level);
                    return;
                }
                _loc_2 = param1.link;
                _loc_4 = _loc_2.split("#");
                if (_loc_4[2])
                {
                    this.openplugin(String(_loc_4[0]), {gototype:int(_loc_4[1]), newid:int(_loc_4[2])});
                }
                if (_loc_4[1] && _loc_4[2] == null)
                {
                    this.openplugin(String(_loc_4[0]), int(_loc_4[1]));
                }
                if (_loc_4[0] && _loc_4[1] == null && _loc_4[2] == null)
                {
                    this.openplugin(String(_loc_4[0]));
                }
            }
            return;
        }// end function

        private function openplugin(param1:String, param2:Object = null) : void
        {
            var _loc_4:Point = null;
            var _loc_3:* = UIGlobel.pointsDic[param1];
            if (_loc_3)
            {
                if (param2)
                {
                    PluginManager.instance.openPlugin(param1, new Point(_loc_3.x, _loc_3.y), param2);
                }
                else
                {
                    PluginManager.instance.openPlugin(param1, new Point(_loc_3.x, _loc_3.y));
                }
            }
            else if (param2)
            {
                PluginManager.instance.openPlugin(param1, new Point(100, 100), param2);
            }
            else if (param1 == "fashion")
            {
                _loc_4 = UIGlobel.pointsDic["role"];
                PluginManager.instance.openPlugin(param1, new Point(_loc_4.x, _loc_4.y));
            }
            else
            {
                PluginManager.instance.openPlugin(param1, new Point(GlobalLayer.instance.root.stageWidth - 300, 100));
            }
            return;
        }// end function

        private function checkHandler(param1:CheckBox, param2:int) : void
        {
            if (this._isOther)
            {
                return;
            }
            var _loc_3:* = param2;
            PluginManager.instance.sendToServer("role", CMDRole.ShowYitian, _loc_3);
            switch(_loc_3)
            {
                case 0:
                {
                    break;
                }
                case 1:
                {
                    break;
                }
                case 2:
                {
                    break;
                }
                case 3:
                {
                    break;
                }
                case 4:
                {
                    break;
                }
                case 5:
                {
                    break;
                }
                default:
                {
                    break;
                }
            }
            return;
        }// end function

        private function menuelistRender(param1:Component, param2:int) : void
        {
            return;
        }// end function

        protected function initEvent() : void
        {
            tbtn1.clickHandler = new Handler(this.tbHandler, [1]);
            tbtn2.clickHandler = new Handler(this.tbHandler, [2]);
            tbtn3.clickHandler = new Handler(this.tbHandler, [3]);
            tbtn4.clickHandler = new Handler(this.tbHandler, [4]);
            tbtn5.clickHandler = new Handler(this.tbHandler, [5]);
            tbtn6.clickHandler = new Handler(this.tbHandler, [6]);
            closebtn.clickHandler = new Handler(this.closeHandler);
            this.armrole.titleimg.addEventListener(UIEvent.IMAGE_LOADED, this.titleLoaded);
            this.armrole.duihuanBtn.addEventListener(MouseEvent.CLICK, this.duihuanHandler);
            return;
        }// end function

        protected function duihuanHandler(event:MouseEvent) : void
        {
            var _loc_2:* = this.armrole.duihuanBtn.localToGlobal(new Point(0, 0));
            PluginManager.instance.open("guanwei", _loc_2, 1);
            return;
        }// end function

        protected function zqimgRollOutHandler(event:MouseEvent) : void
        {
            ModelProxy.change("tips", "state", "close");
            return;
        }// end function

        protected function zqImgRollOverHandler(event:MouseEvent) : void
        {
            var _loc_2:* = new Point(GlobalLayer.instance.flashStage.mouseX, GlobalLayer.instance.flashStage.mouseY);
            ModelProxy.change("tips", "horseskilltips", {data:4, p:_loc_2});
            return;
        }// end function

        protected function yyimgRollOutHandler(event:MouseEvent) : void
        {
            ModelProxy.change("tips", "state", "close");
            return;
        }// end function

        protected function yyImgRollOverHandler(event:MouseEvent) : void
        {
            var _loc_2:* = new Point(GlobalLayer.instance.flashStage.mouseX, GlobalLayer.instance.flashStage.mouseY);
            ModelProxy.change("tips", "wingskilltips", {data:4, p:_loc_2});
            return;
        }// end function

        protected function tzImgRollOverHandler(event:MouseEvent) : void
        {
            var _loc_5:Object = null;
            var _loc_7:Object = null;
            var _loc_8:Object = null;
            var _loc_9:Object = null;
            var _loc_10:Object = null;
            var _loc_11:Array = null;
            var _loc_12:Object = null;
            var _loc_13:Object = null;
            var _loc_14:Object = null;
            var _loc_15:int = 0;
            var _loc_16:int = 0;
            var _loc_17:int = 0;
            var _loc_18:Object = null;
            var _loc_19:int = 0;
            var _loc_20:Object = null;
            var _loc_2:String = "";
            var _loc_3:Boolean = false;
            var _loc_4:* = ConfigDictionary.data.chuanqi;
            var _loc_6:Array = [3, 1];
            for each (_loc_7 in _loc_6)
            {
                
                _loc_8 = _loc_4[_loc_7];
                if (_loc_7 == 1)
                {
                    _loc_2 = _loc_2 + "<font color=\'#ff6600\' size=\'14\'>传奇套装</font>\n";
                }
                else
                {
                    _loc_2 = _loc_2 + "<font color=\'#ff6600\' size=\'14\'>传说套装</font>\n";
                }
                for (_loc_9 in _loc_8)
                {
                    
                    if (!(_loc_8[_loc_9] is String || _loc_8[_loc_9] is int))
                    {
                        _loc_5 = _loc_8[_loc_9];
                        _loc_11 = new Array();
                        for each (_loc_12 in this._armsArr)
                        {
                            
                            if (_loc_12 && _loc_12.suitid == _loc_7)
                            {
                                _loc_17 = 1;
                                while (_loc_17 <= int(_loc_12.suitlevel))
                                {
                                    
                                    _loc_11[_loc_17] = int(_loc_11[_loc_17]) + 1;
                                    _loc_17++;
                                }
                            }
                        }
                        _loc_13 = new Object();
                        _loc_14 = new Object();
                        _loc_15 = int(_loc_8.max);
                        while (_loc_15 >= 1)
                        {
                            
                            _loc_18 = _loc_8[_loc_15];
                            _loc_19 = 0;
                            while (_loc_19 < 15)
                            {
                                
                                if (!_loc_13[_loc_19])
                                {
                                    if (_loc_18.hasOwnProperty(_loc_19))
                                    {
                                        if (_loc_18[_loc_19].num <= _loc_11[_loc_15])
                                        {
                                            _loc_13[_loc_19] = _loc_18[_loc_19];
                                            if (_loc_15 == _loc_9)
                                            {
                                                _loc_14[_loc_18[_loc_19].num] = _loc_13[_loc_19];
                                            }
                                        }
                                    }
                                }
                                _loc_19++;
                            }
                            _loc_15 = _loc_15 - 1;
                        }
                        _loc_2 = _loc_2 + MColor.getHMTL(_loc_5.name + "(" + int(_loc_11[_loc_9]) + "/" + _loc_8.maxnum + ")\n", 6);
                        _loc_3 = true;
                        _loc_16 = 0;
                        while (_loc_16 <= 15)
                        {
                            
                            if (_loc_5.hasOwnProperty(_loc_16))
                            {
                                if (_loc_14.hasOwnProperty(_loc_16))
                                {
                                    _loc_20 = _loc_14[_loc_16];
                                    _loc_2 = _loc_2 + MColor.getHMTL(this.taotype[(_loc_20.type - 1)] + ":+" + _loc_20.value + "   " + _loc_20.num + "件激活\n", 7);
                                    _loc_3 = true;
                                }
                                else
                                {
                                    _loc_2 = _loc_2 + MColor.getHMTL(this.taotype[(_loc_5[_loc_16].type - 1)] + ":+" + _loc_5[_loc_16].value + "   " + _loc_5[_loc_16].num + "件激活\n", 2);
                                    _loc_3 = true;
                                }
                            }
                            _loc_16++;
                        }
                    }
                }
            }
            ModelProxy.change("tips", "normal", {data:_loc_2, p:new Point()});
            return;
        }// end function

        protected function onOver(event:MouseEvent) : void
        {
            var _loc_2:* = event.currentTarget as ArmItemCtrl;
            if (!_loc_2 || _loc_2.data == null)
            {
                return;
            }
            this.removeEventListener(MouseEvent.MOUSE_OVER, this.onOver);
            if (_loc_2.data.itemtype == 1)
            {
                ModelProxy.change("tips", "arm", {data:[_loc_2.data, this._armsArr], p:new Point(GlobalLayer.instance.flashStage.mouseX, GlobalLayer.instance.flashStage.mouseY)});
            }
            this.addEventListener(MouseEvent.MOUSE_OUT, this.onOut);
            return;
        }// end function

        protected function onOut(event:MouseEvent) : void
        {
            this.removeEventListener(MouseEvent.MOUSE_OUT, this.onOut);
            ModelProxy.change("tips", "state", "close");
            this.addEventListener(MouseEvent.MOUSE_OVER, this.onOver);
            return;
        }// end function

        private function paimingHandler() : void
        {
            PluginManager.instance.openPlugin("rank", UIGlobel.pointsDic["rank"], 1);
            return;
        }// end function

        protected function titleLoaded(event:UIEvent) : void
        {
            this.armrole.titleimg.x = (-this.armrole.titleimg.width) / 2;
            return;
        }// end function

        protected function szimgRollOutHandler(event:MouseEvent) : void
        {
            ModelProxy.change("tips", "state", "close");
            return;
        }// end function

        protected function szimgRollOverHandler(event:MouseEvent) : void
        {
            if (this._isOther)
            {
                this.showFashtionTips(this.otherfashion);
            }
            else
            {
                this.showFashtionTips(ModelProxy.getValue("data", "pfashion"));
            }
            return;
        }// end function

        protected function ycclick(event:MouseEvent) : void
        {
            return;
        }// end function

        protected function showVip(event:MouseEvent) : void
        {
            PluginManager.instance.changePlugin("vip", new Point(100, 100));
            return;
        }// end function

        protected function zsImgRollOutHandler(event:MouseEvent) : void
        {
            ModelProxy.change("tips", "state", "close");
            return;
        }// end function

        protected function zsImgRollOverHandler(event:MouseEvent) : void
        {
            if (this._qhtzTips == null)
            {
                return;
            }
            ModelProxy.change("tips", "normal", {data:this._qhtzTips, p:new Point()});
            return;
        }// end function

        protected function jdImgRollOverHandler(event:MouseEvent) : void
        {
            if (this._jdtzTips == null)
            {
                return;
            }
            ModelProxy.change("tips", "normal", {data:this._jdtzTips, p:new Point()});
            return;
        }// end function

        protected function bsImgRollOverHandler(event:MouseEvent) : void
        {
            if (this._bstzTips == null)
            {
                return;
            }
            ModelProxy.change("tips", "normal", {data:this._bstzTips, p:new Point()});
            return;
        }// end function

        protected function qhimgRollOutHandler(event:MouseEvent) : void
        {
            ModelProxy.change("tips", "state", "close");
            return;
        }// end function

        protected function qhimgRollOverHandler(event:MouseEvent) : void
        {
            if (this.cfgrein == null)
            {
                this.cfgrein = ConfigDictionary.data.rein;
            }
            var _loc_2:* = UserData.getUserData();
            var _loc_3:* = RoleUtil.getAttribute(75 + 5 * this.rein, _loc_2.rein, _loc_2.career);
            var _loc_4:* = RoleUtil.getAttribute(80 + 5 * this.rein, (int(_loc_2.rein) + 1), _loc_2.career);
            var _loc_5:* = "<font color=\'#ffcc00\' size=\'14\'>转生效果加成</font>\n" + "<font color=\'#ff6600\'>当前效果：</font><font color=\'#b23aee\'>" + this.rein + "转" + (75 + 5 * this.rein) + "级</font>\n" + "生命值    <font color=\'#fff7af\'>" + _loc_3.maxHp + "</font>\n" + "魔法值    <font color=\'#fff7af\'>" + _loc_3.maxMp + "</font>\n" + "物理攻击  <font color=\'#fff7af\'>" + _loc_3.phyLowAtt + "-" + _loc_3.phyHighAtt + "</font>\n" + "魔法攻击  <font color=\'#fff7af\'>" + _loc_3.magicLowAtt + "-" + _loc_3.magicHighAtt + "</font>\n" + "道术攻击  <font color=\'#fff7af\'>" + _loc_3.taoLowAtt + "-" + _loc_3.taoHighAtt + "</font>\n" + "物理防御  <font color=\'#fff7af\'>" + _loc_3.phyLowDef + "-" + _loc_3.phyHighDef + "</font>\n" + "魔法防御  <font color=\'#fff7af\'>" + _loc_3.magicLowDef + "-" + _loc_3.magicHighDef + "</font>\n" + "精准      <font color=\'#fff7af\'>" + _loc_3.accurate + "</font>\n" + "闪避      <font color=\'#fff7af\'>" + _loc_3.dodge + "</font>\n" + "生命恢复  <font color=\'#fff7af\'>" + int(_loc_3.maxHp / 36) + "</font>\n" + "魔法恢复  <font color=\'#fff7af\'>" + int(_loc_3.maxHp / 36 / 3) + "</font>\n" + "负面恢复  <font color=\'#fff7af\'>" + 0 + "</font>\n" + "<font color=\'#ff6600\'>下转效果：</font><font color=\'#b23aee\'>" + (int(this.rein) + 1) + "转" + (80 + 5 * this.rein) + "级</font>\n" + "<font color=\'#b5b5b5\'>生命值    " + _loc_4.maxHp + "</font>\n" + "<font color=\'#b5b5b5\'>魔法值    " + _loc_4.maxMp + "</font>\n" + "<font color=\'#b5b5b5\'>物理攻击  " + _loc_4.phyLowAtt + "-" + _loc_4.phyHighAtt + "</font>\n" + "<font color=\'#b5b5b5\'>魔法攻击  " + _loc_4.magicLowAtt + "-" + _loc_4.magicHighAtt + "</font>\n" + "<font color=\'#b5b5b5\'>道术攻击  " + _loc_4.taoLowAtt + "-" + _loc_4.taoHighAtt + "</font>\n" + "<font color=\'#b5b5b5\'>物理防御  " + _loc_4.phyLowDef + "-" + _loc_4.phyHighDef + "</font>\n" + "<font color=\'#b5b5b5\'>魔法防御  " + _loc_4.magicLowDef + "-" + _loc_4.magicHighDef + "</font>\n" + "<font color=\'#b5b5b5\'>精准      " + _loc_4.accurate + "</font>\n" + "<font color=\'#b5b5b5\'>闪避      " + _loc_4.dodge + "</font>\n" + "<font color=\'#b5b5b5\'>生命恢复  " + int(_loc_4.maxHp / 36) + "</font>\n" + "<font color=\'#b5b5b5\'>魔法恢复  " + int(_loc_4.maxHp / 36 / 3) + "</font>\n" + "<font color=\'#b5b5b5\'>负面恢复  " + 0 + "</font>\n";
            ModelProxy.change("tips", "normal", {data:_loc_5, p:new Point()});
            return;
        }// end function

        private function closeHandler() : void
        {
            this.mUIBase.close();
            this.neigong.playComplete1();
            this.neigong.clearSuccessEffect();
            this.baoshi.clearSelectEffect();
            this.fashion.clearModel();
            this.feishen.clearMC();
            return;
        }// end function

        public function closeComplate() : void
        {
            ModelProxy.change("bag", "zhuangbeiTXBoo", 0);
            this.fashion.clearModel();
            this.fashion.tab_shizhuang.selectedIndex = -1;
            this.fashion.list.selectedIndex = -1;
            if (this.role)
            {
                this.role.removeRole(true);
                this.role = null;
            }
            this.neigong.playComplete1();
            this.neigong.clearSuccessEffect();
            this.baoshi.clearSelectEffect();
            this.feishen.clearMC();
            return;
        }// end function

        public function updatePowArr() : void
        {
            var _loc_1:int = 0;
            var _loc_2:Object = null;
            var _loc_3:int = 0;
            var _loc_4:Object = null;
            var _loc_32:Object = null;
            var _loc_43:Object = null;
            var _loc_44:Object = null;
            var _loc_45:Object = null;
            var _loc_51:Object = null;
            var _loc_52:int = 0;
            var _loc_53:int = 0;
            var _loc_54:int = 0;
            var _loc_55:int = 0;
            var _loc_56:int = 0;
            var _loc_57:int = 0;
            var _loc_58:int = 0;
            var _loc_59:int = 0;
            var _loc_62:Object = null;
            var _loc_63:int = 0;
            var _loc_64:int = 0;
            var _loc_65:int = 0;
            var _loc_66:Object = null;
            var _loc_67:int = 0;
            var _loc_68:Array = null;
            var _loc_5:int = 0;
            var _loc_6:int = 0;
            var _loc_7:int = 0;
            var _loc_8:int = 0;
            var _loc_9:int = 0;
            var _loc_10:int = 0;
            var _loc_11:int = 0;
            var _loc_12:int = 0;
            var _loc_13:int = 0;
            var _loc_14:int = 0;
            var _loc_15:int = 0;
            var _loc_16:int = 0;
            var _loc_17:int = 0;
            var _loc_18:int = 0;
            var _loc_19:int = 0;
            var _loc_20:int = 0;
            var _loc_21:int = 0;
            var _loc_22:int = 0;
            var _loc_23:int = 0;
            var _loc_24:int = 0;
            var _loc_25:int = 0;
            var _loc_26:int = 0;
            var _loc_27:int = 0;
            var _loc_28:int = 0;
            var _loc_29:int = 0;
            var _loc_30:int = 0;
            this.zhanliArr = [_loc_5, _loc_6, _loc_7, _loc_8, _loc_9, _loc_10, _loc_11, _loc_12, _loc_13, _loc_14, _loc_15, _loc_16, _loc_17, _loc_18, _loc_19, _loc_20, _loc_21, _loc_22, _loc_23, _loc_24, _loc_25, _loc_26, _loc_27, _loc_28, _loc_29, _loc_30];
            _loc_5 = getBasePow();
            var _loc_31:* = UserData.getUserData("skills");
            for (_loc_32 in _loc_31)
            {
                
                _loc_62 = _loc_31[_loc_32];
                if (_loc_62.nbvalue)
                {
                    _loc_6 = _loc_6 + int(_loc_62.nbvalue);
                }
            }
            this._armsArr = ModelProxy.getValue("data", "arms");
            _loc_1 = 1;
            while (_loc_1 <= 15)
            {
                
                if (this._armsArr[_loc_1] && _loc_1 != 13 && _loc_1 != 11)
                {
                    _loc_7 = _loc_7 + int(this._armsArr[_loc_1].nbvalue);
                }
                _loc_1++;
            }
            if (!this.cfgitem)
            {
                this.cfgitem = ConfigDictionary.data.item;
            }
            _loc_1 = 1;
            while (_loc_1 <= 15)
            {
                
                if (this._armsArr[_loc_1])
                {
                    _loc_8 = _loc_8 + this.getMaxAdd(this._armsArr[_loc_1]);
                    _loc_9 = _loc_9 + this.getzsPow(this._armsArr[_loc_1]);
                    _loc_26 = _loc_26 + this.getjdPow(this._armsArr[_loc_1]);
                }
                _loc_1++;
            }
            if (this._armsArr[13])
            {
                _loc_25 = int(this._armsArr[13].nbvalue);
            }
            if (!this.horseprop)
            {
                this.horseprop = ConfigDictionary.data.wingprop;
            }
            var _loc_33:* = ModelProxy.getValue("data", "wing");
            var _loc_34:* = ConfigDictionary.data.horseSkill;
            if (_loc_33)
            {
                _loc_10 = int(this.horseprop[int(_loc_33.level)][int(_loc_33.star)].power);
                if (_loc_33.skill)
                {
                    for (_loc_2 in _loc_33.skill)
                    {
                        
                        _loc_3 = _loc_33.skill[_loc_2];
                        if (_loc_3 > 0)
                        {
                            _loc_29 = _loc_29 + int(_loc_34[(int(_loc_2) + 1)][_loc_3].zhanli);
                        }
                    }
                }
            }
            _loc_1 = 101;
            while (_loc_1 <= 104)
            {
                
                if (this._armsArr[_loc_1])
                {
                    _loc_11 = _loc_11 + int(this._armsArr[_loc_1].nbvalue);
                }
                _loc_1++;
            }
            if (!this.wingprop)
            {
                this.wingprop = ConfigDictionary.data.wingprop;
            }
            var _loc_35:* = ConfigDictionary.data.wingSkill;
            var _loc_36:* = ModelProxy.getValue("data", "wing");
            if (ModelProxy.getValue("data", "wing"))
            {
                _loc_12 = int(this.wingprop[int(_loc_36.level)][int(_loc_36.star)].power);
                _loc_30 = 0;
                if (_loc_36.skill)
                {
                    for (_loc_2 in _loc_36.skill)
                    {
                        
                        _loc_3 = _loc_36.skill[_loc_2];
                        if (_loc_3 > 0)
                        {
                            _loc_30 = _loc_30 + int(_loc_35[(int(_loc_2) + 1)][_loc_3].zhanli);
                        }
                    }
                }
            }
            _loc_1 = 201;
            while (_loc_1 <= 204)
            {
                
                if (this._armsArr[_loc_1])
                {
                    _loc_13 = _loc_13 + int(this._armsArr[_loc_1].nbvalue);
                }
                _loc_1++;
            }
            var _loc_37:* = UserData.getOnlineData("jingmai");
            var _loc_38:* = ConfigDictionary.data.jmadd;
            if (int(_loc_37[1]) != 0)
            {
                _loc_14 = _loc_38[int(_loc_37[0])][int(_loc_37[1])].nbvalue;
            }
            else if (int(_loc_37[0] != 1))
            {
                _loc_14 = _loc_38[int((_loc_37[0] - 1))][10].nbvalue;
            }
            else
            {
                _loc_14 = 0;
            }
            _loc_1 = 1;
            while (_loc_1 <= 15)
            {
                
                if (this._armsArr[_loc_1] && this._armsArr[_loc_1].xq)
                {
                    _loc_63 = 0;
                    while (_loc_63 < 6)
                    {
                        
                        if (this._armsArr[_loc_1].xq[_loc_63])
                        {
                            if (this.cfgitem[int(this._armsArr[_loc_1].xq[_loc_63])].bstype && int(this.cfgitem[int(this._armsArr[_loc_1].xq[_loc_63])].bstype) != 8)
                            {
                                _loc_15 = _loc_15 + int(this.cfgitem[int(this._armsArr[_loc_1].xq[_loc_63])].nbvalue);
                            }
                            else if (this.cfgitem[int(this._armsArr[_loc_1].xq[_loc_63])].bstype)
                            {
                                _loc_16 = _loc_16 + int(this.cfgitem[int(this._armsArr[_loc_1].xq[_loc_63])].nbvalue);
                            }
                        }
                        _loc_63++;
                    }
                }
                _loc_1++;
            }
            var _loc_39:Array = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
            var _loc_40:* = ConfigDictionary.data.rings;
            var _loc_41:* = ModelProxy.getValue("data", "ringdata");
            var _loc_42:Array = [[]];
            for each (_loc_43 in _loc_40)
            {
                
                _loc_64 = int(_loc_43.ringid) - 1;
                _loc_65 = _loc_41[_loc_64];
                if (_loc_43.ringlevel <= _loc_65)
                {
                    _loc_39[0] = _loc_39[0] + int(_loc_43.atk);
                    _loc_39[1] = _loc_39[1] + int(_loc_43.atkmax);
                    _loc_39[2] = _loc_39[2] + int(_loc_43.phydef);
                    _loc_39[3] = _loc_39[3] + int(_loc_43.phydefmax);
                    _loc_39[4] = _loc_39[4] + int(_loc_43.magdef);
                    _loc_39[5] = _loc_39[5] + int(_loc_43.magdefmax);
                    _loc_39[6] = _loc_39[6] + int(_loc_43.hp);
                    _loc_39[7] = _loc_39[7] + int(_loc_43.mp);
                    _loc_39[8] = _loc_39[8] + int(_loc_43.pureatk);
                    _loc_39[9] = _loc_39[9] + int(_loc_43.puredef);
                    _loc_39[10] = _loc_39[10] + int(_loc_43.speed);
                    _loc_39[11] = _loc_39[11] + int(_loc_43.critrate);
                }
            }
            _loc_17 = _loc_39[0] + _loc_39[1] + _loc_39[3] * 0.3 + _loc_39[5] * 0.3 + _loc_39[11] * 10 + _loc_39[8] + _loc_39[9] + _loc_39[10] * 100 + _loc_39[6] / 5 + _loc_39[7] / 15;
            _loc_44 = ConfigDictionary.data.designer;
            _loc_45 = ModelProxy.getValue("data", "pfashion");
            if (_loc_45 && _loc_45.r1 && _loc_45.r1[0] && _loc_44[1] && _loc_44[1][int(_loc_45.r1[0])])
            {
                _loc_18 = int(_loc_44[1][int(_loc_45.r1[0])].nbvalue);
            }
            if (_loc_45 && _loc_45.r2 && _loc_45.r2[0] && _loc_44[2] && _loc_44[2][int(_loc_45.r2[0])])
            {
                _loc_19 = int(_loc_44[2][int(_loc_45.r2[0])].nbvalue);
            }
            if (_loc_45 && _loc_45.r3 && _loc_45.r3[0] && _loc_44[3] && _loc_44[3][int(_loc_45.r3[0])])
            {
                _loc_20 = int(_loc_44[3][int(_loc_45.r3[0])].nbvalue);
            }
            if (_loc_45 && _loc_45.r4 && _loc_45.r4[0] && _loc_44[4] && _loc_44[4][int(_loc_45.r4[0])])
            {
                _loc_21 = int(_loc_44[4][int(_loc_45.r4[0])].nbvalue);
            }
            if (_loc_45 && _loc_45.r5 && _loc_45.r5[0] && _loc_44[5] && _loc_44[5][int(_loc_45.r5[0])])
            {
                _loc_22 = int(_loc_44[5][int(_loc_45.r5[0])].nbvalue);
            }
            var _loc_46:* = ConfigDictionary.data.fashion;
            _loc_1 = 1;
            while (_loc_1 <= 5)
            {
                
                if (_loc_45 && _loc_45[_loc_1])
                {
                    _loc_23 = _loc_23 + int(_loc_46[int(_loc_45[_loc_1])].nbvalue);
                }
                _loc_1++;
            }
            var _loc_47:* = ConfigDictionary.data.title;
            var _loc_48:* = ModelProxy.getValue("data", "titles");
            var _loc_49:* = new Dictionary();
            if (_loc_48 != null)
            {
                for each (_loc_4 in _loc_48.source)
                {
                    
                    _loc_49[_loc_4] = true;
                }
            }
            var _loc_50:Array = [];
            for each (_loc_51 in _loc_47)
            {
                
                _loc_66 = _loc_51;
                if (_loc_49[_loc_66.id])
                {
                    _loc_50.push(_loc_66);
                }
            }
            _loc_52 = 0;
            _loc_53 = 0;
            _loc_54 = 0;
            _loc_55 = 0;
            _loc_56 = 0;
            _loc_57 = 0;
            _loc_58 = 0;
            _loc_59 = 0;
            if (_loc_50.length > 0)
            {
                _loc_67 = 0;
                while (_loc_67 < _loc_50.length)
                {
                    
                    _loc_52 = _loc_52 + int(_loc_50[_loc_67].att);
                    _loc_53 = _loc_53 + int(_loc_50[_loc_67].attMax);
                    _loc_54 = _loc_54 + int(_loc_50[_loc_67].phyDef);
                    _loc_55 = _loc_55 + int(_loc_50[_loc_67].phyDefMax);
                    _loc_56 = _loc_56 + int(_loc_50[_loc_67].magicDef);
                    _loc_57 = _loc_57 + int(_loc_50[_loc_67].magicDefMax);
                    _loc_58 = _loc_58 + int(_loc_50[_loc_67].hp);
                    _loc_59 = _loc_59 + int(_loc_50[_loc_67].mp);
                    _loc_67++;
                }
            }
            _loc_24 = int(_loc_52 + _loc_53 + _loc_55 * 0.3 + _loc_57 * 0.3 + _loc_58 / 5 + _loc_59 / 15);
            var _loc_60:* = ConfigDictionary.data.guanwei;
            var _loc_61:* = UserData.getUserData();
            if (UserData.getUserData().guanzhi > 0)
            {
                _loc_27 = _loc_60[_loc_61.guanzhi].guanzhizl;
            }
            if (this._armsArr.hasOwnProperty("13") && this._armsArr[13].hasOwnProperty("id"))
            {
                _loc_28 = this._armsArr[13].nbvalue;
            }
            this.zhanliArr = [_loc_5, _loc_6, _loc_7, _loc_8, _loc_9, _loc_10, _loc_11, _loc_12, _loc_13, _loc_14, _loc_15, _loc_16, _loc_17, _loc_18, _loc_19, _loc_20, _loc_21, _loc_22, _loc_23, _loc_24, _loc_25, _loc_26, _loc_27, _loc_28, _loc_29, _loc_30];
            this.pingjunArr = [];
            if (this.zlxqcfg == null)
            {
                this.zlxqcfg = ConfigDictionary.data.zhanli;
            }
            _loc_1 = 1;
            while (_loc_1 <= 9)
            {
                
                _loc_68 = [];
                for each (_loc_4 in this.zlxqcfg)
                {
                    
                    if (int(_loc_4.zltype) == _loc_1)
                    {
                        _loc_68.push(_loc_4);
                    }
                }
                this.pingjunArr.push(this.getPingjunNum(_loc_68));
                _loc_1++;
            }
            this.selectHandler1(0);
            return;
        }// end function

        private function getPingjunNum(param1:Array) : int
        {
            var _loc_5:Object = null;
            var _loc_6:int = 0;
            var _loc_7:int = 0;
            var _loc_2:* = UserData.getUserData("level");
            var _loc_3:Array = [];
            var _loc_4:int = 0;
            for each (_loc_5 in param1)
            {
                
                if (_loc_2 - int(_loc_5.level) > 0)
                {
                    _loc_4 = int(_loc_5.totalzl) * (_loc_2 - int(_loc_5.level)) / (120 - int(_loc_5.level));
                }
                else
                {
                    _loc_4 = 0;
                }
                if (this.zhanliArr)
                {
                    if (_loc_4 == 0)
                    {
                        _loc_3.push(0);
                        continue;
                    }
                    _loc_3.push(Math.ceil(int(this.zhanliArr[(int(_loc_5.id) - 1)]) / _loc_4 * 100));
                }
            }
            _loc_6 = 0;
            _loc_7 = 0;
            while (_loc_7 < _loc_3.length)
            {
                
                _loc_6 = _loc_6 + _loc_3[_loc_7];
                _loc_7++;
            }
            var _loc_8:* = _loc_6 / int(_loc_3.length);
            if (_loc_6 / int(_loc_3.length) >= 50)
            {
                return 1;
            }
            return 0;
        }// end function

        protected function txt1ClickHandler(event:MouseEvent) : void
        {
            var _loc_2:int = 0;
            if (this._zhanliid > 0)
            {
            }
            this.selectHandler1(0);
            return;
        }// end function

        private function getjdPow(param1:Object) : int
        {
            var _loc_3:Array = null;
            var _loc_4:int = 0;
            var _loc_5:int = 0;
            var _loc_6:int = 0;
            var _loc_7:int = 0;
            var _loc_8:int = 0;
            var _loc_9:int = 0;
            var _loc_10:int = 0;
            var _loc_11:int = 0;
            var _loc_12:int = 0;
            var _loc_13:int = 0;
            var _loc_14:int = 0;
            var _loc_15:int = 0;
            var _loc_16:int = 0;
            var _loc_17:int = 0;
            var _loc_18:int = 0;
            var _loc_19:int = 0;
            var _loc_20:int = 0;
            var _loc_21:int = 0;
            var _loc_22:int = 0;
            var _loc_2:int = 0;
            if (param1 && param1.appraisal != null)
            {
                _loc_3 = param1.appraisal;
                _loc_5 = 0;
                _loc_6 = 0;
                _loc_7 = 0;
                _loc_8 = 0;
                _loc_9 = 0;
                _loc_10 = 0;
                _loc_11 = 0;
                _loc_12 = 0;
                _loc_13 = 0;
                _loc_14 = 0;
                _loc_15 = 0;
                _loc_16 = 0;
                _loc_17 = 0;
                _loc_18 = 0;
                _loc_19 = 0;
                while (_loc_19 < _loc_3.length)
                {
                    
                    _loc_21 = (_loc_3[_loc_19] & 983040) >> 16;
                    _loc_22 = _loc_3[_loc_19] & 65535;
                    if (_loc_21 == 1)
                    {
                        _loc_15 = _loc_15 + _loc_22;
                    }
                    else if (_loc_21 == 2)
                    {
                        _loc_16 = _loc_16 + _loc_22;
                    }
                    else if (_loc_21 == 3)
                    {
                        _loc_4 = _loc_4 + _loc_22;
                    }
                    else if (_loc_21 == 4)
                    {
                        _loc_5 = _loc_5 + _loc_22;
                    }
                    else if (_loc_21 == 5)
                    {
                        _loc_6 = _loc_6 + _loc_22;
                    }
                    else if (_loc_21 == 6)
                    {
                        _loc_7 = _loc_7 + _loc_22;
                    }
                    else if (_loc_21 == 7)
                    {
                        _loc_8 = _loc_8 + _loc_22;
                    }
                    else if (_loc_21 == 8)
                    {
                        _loc_13 = _loc_13 + _loc_22;
                    }
                    else if (_loc_21 == 9)
                    {
                        _loc_14 = _loc_14 + _loc_22;
                    }
                    else if (_loc_21 == 10)
                    {
                        _loc_10 = _loc_10 + _loc_22;
                    }
                    _loc_19++;
                }
                _loc_20 = int((_loc_4 + (_loc_5 + _loc_6) * 0.3 + _loc_7 / 10 + _loc_8 / 30) * 2);
                _loc_2 = int((_loc_20 + _loc_10 * 10 + _loc_11 * 30 + _loc_12 * 30 + _loc_13 / 10 + _loc_14 / 30 + _loc_15 + _loc_16) * (1 + (_loc_17 - 120) / 200));
            }
            return _loc_2;
        }// end function

        private function getzsPow(param1:Object) : int
        {
            var _loc_2:* = ModelProxy.getValue("data", "user");
            var _loc_3:* = _loc_2.career;
            var _loc_4:* = param1.magicDefMax * param1.zs * 0.05;
            var _loc_5:* = param1.phyDefMax * param1.zs * 0.05;
            var _loc_6:* = param1.hp * param1.zs * 0.05;
            var _loc_7:* = param1.mp * param1.zs * 0.05;
            var _loc_8:int = 0;
            switch(_loc_3)
            {
                case 1:
                {
                    _loc_8 = param1.phyAttMax * param1.zs * 0.05;
                    break;
                }
                case 2:
                {
                    _loc_8 = param1.magicAttMax * param1.zs * 0.05;
                    break;
                }
                case 3:
                {
                    _loc_8 = param1.taoAttMax * param1.zs * 0.05;
                    break;
                }
                default:
                {
                    break;
                    break;
                }
            }
            return _loc_8 + _loc_5 * 0.3 + _loc_4 * 0.3 + _loc_6 / 5 + _loc_7 / 15;
        }// end function

        private function tbHandler(param1:int) : void
        {
            var _loc_3:int = 0;
            var _loc_4:int = 0;
            if (GuideView.getInstance().gid == GuideType.GUIDE_LINSHI)
            {
                GuideView.getInstance().hide(false);
            }
            this.roleBuffer.updateRoleLevel();
            var _loc_2:* = PluginManager.instance.checkOpenLevel("role", this._tabIndex[(param1 - 1)]);
            if (_loc_2)
            {
                if (param1 == 2)
                {
                    WarningManager.show(30, [_loc_2.level, "转生系统"]);
                    return;
                }
                if (param1 == 3)
                {
                    WarningManager.show(30, [_loc_2.level, "灵石系统"]);
                    return;
                }
                if (param1 == 5)
                {
                    WarningManager.show(30, [_loc_2.level, "时装系统"]);
                    return;
                }
            }
            this._curTab = param1;
            switch(param1)
            {
                case 1:
                {
                    tbtn1.selected = true;
                    tbtn2.selected = false;
                    this.zhuansheng.visible = false;
                    rolelabel.text = "人物属性";
                    this.neigong.visible = false;
                    this.armrole.visible = true;
                    this.armrole.leftbox.visible = true;
                    if (this._roleContainer)
                    {
                        this._roleContainer.visible = true;
                    }
                    tbtn3.selected = false;
                    this.baoshi.visible = false;
                    this.neigong.visible = false;
                    tbtn4.selected = false;
                    this.fashion.visible = false;
                    tbtn5.selected = false;
                    this.feishen.visible = false;
                    tbtn6.selected = false;
                    txt21.color = "0xb9774b";
                    var _loc_5:String = "0x977f6c";
                    txt24.color = "0x977f6c";
                    var _loc_5:* = _loc_5;
                    txt25.color = _loc_5;
                    var _loc_5:* = _loc_5;
                    txt23.color = _loc_5;
                    var _loc_5:* = _loc_5;
                    txt22.color = _loc_5;
                    txt26.color = _loc_5;
                    txt21.bold = true;
                    var _loc_5:Boolean = false;
                    txt24.bold = false;
                    var _loc_5:* = _loc_5;
                    txt25.bold = _loc_5;
                    var _loc_5:* = _loc_5;
                    txt23.bold = _loc_5;
                    var _loc_5:* = _loc_5;
                    txt22.bold = _loc_5;
                    txt26.bold = _loc_5;
                    break;
                }
                case 2:
                {
                    if (this._isOther == false)
                    {
                        tbtn1.selected = false;
                        this.armrole.visible = false;
                        tbtn2.selected = true;
                        this.zhuansheng.visible = true;
                        this.zhuansheng.zhuanshengbg1.url = "cs2_zhuansheng/bg.jpg";
                        this.zhuansheng.zhuanshengbg2.url = "cs2_zhuansheng/bg.jpg";
                        this.zhuansheng.zhuanshengbg3.url = "cs2_zhuansheng/kuang3.png";
                        rolelabel.text = "转  生";
                        if (this._roleContainer)
                        {
                            this._roleContainer.visible = false;
                        }
                        tbtn3.selected = false;
                        this.baoshi.visible = false;
                        this.neigong.visible = false;
                        tbtn4.selected = false;
                        this.fashion.visible = false;
                        this.feishen.visible = false;
                        tbtn5.selected = false;
                        tbtn6.selected = false;
                        txt22.color = "0xb9774b";
                        var _loc_5:String = "0x977f6c";
                        txt24.color = "0x977f6c";
                        var _loc_5:* = _loc_5;
                        txt25.color = _loc_5;
                        var _loc_5:* = _loc_5;
                        txt23.color = _loc_5;
                        var _loc_5:* = _loc_5;
                        txt21.color = _loc_5;
                        txt26.color = _loc_5;
                        txt22.bold = true;
                        var _loc_5:Boolean = false;
                        txt24.bold = false;
                        var _loc_5:* = _loc_5;
                        txt25.bold = _loc_5;
                        var _loc_5:* = _loc_5;
                        txt23.bold = _loc_5;
                        var _loc_5:* = _loc_5;
                        txt21.bold = _loc_5;
                        txt26.bold = _loc_5;
                    }
                    break;
                }
                case 3:
                {
                    if (this._isOther == false)
                    {
                        tbtn1.selected = false;
                        this.armrole.visible = false;
                        tbtn2.selected = false;
                        this.zhuansheng.visible = false;
                        this.neigong.visible = false;
                        tbtn5.selected = false;
                        if (this._roleContainer)
                        {
                            this._roleContainer.visible = false;
                        }
                        tbtn3.selected = true;
                        this.baoshi.visible = true;
                        tbtn4.selected = false;
                        tbtn6.selected = false;
                        this.baoshi.openRefresh();
                        rolelabel.text = "灵  石";
                        this.fashion.visible = false;
                        this.feishen.visible = false;
                        txt23.color = "0xb9774b";
                        var _loc_5:String = "0x977f6c";
                        txt24.color = "0x977f6c";
                        var _loc_5:* = _loc_5;
                        txt25.color = _loc_5;
                        var _loc_5:* = _loc_5;
                        txt21.color = _loc_5;
                        var _loc_5:* = _loc_5;
                        txt22.color = _loc_5;
                        txt26.color = _loc_5;
                        txt23.bold = true;
                        var _loc_5:Boolean = false;
                        txt24.bold = false;
                        var _loc_5:* = _loc_5;
                        txt25.bold = _loc_5;
                        var _loc_5:* = _loc_5;
                        txt21.bold = _loc_5;
                        var _loc_5:* = _loc_5;
                        txt22.bold = _loc_5;
                        txt26.bold = _loc_5;
                    }
                    break;
                }
                case 4:
                {
                    if (this._isOther == false)
                    {
                        rolelabel.text = "内  功";
                        tbtn1.selected = false;
                        this.armrole.visible = false;
                        tbtn2.selected = false;
                        tbtn3.selected = false;
                        tbtn4.selected = true;
                        tbtn5.selected = false;
                        tbtn6.selected = false;
                        this.zhuansheng.visible = false;
                        if (this._roleContainer)
                        {
                            this._roleContainer.visible = false;
                        }
                        this.baoshi.visible = false;
                        this.fashion.visible = false;
                        this.neigong.visible = true;
                        this.feishen.visible = false;
                        this.neigong.openRefresh();
                        txt24.color = "0xb9774b";
                        var _loc_5:String = "0x977f6c";
                        txt25.color = "0x977f6c";
                        var _loc_5:* = _loc_5;
                        txt21.color = _loc_5;
                        var _loc_5:* = _loc_5;
                        txt23.color = _loc_5;
                        var _loc_5:* = _loc_5;
                        txt22.color = _loc_5;
                        txt26.color = _loc_5;
                        txt24.bold = true;
                        var _loc_5:Boolean = false;
                        txt23.bold = false;
                        var _loc_5:* = _loc_5;
                        txt25.bold = _loc_5;
                        var _loc_5:* = _loc_5;
                        txt21.bold = _loc_5;
                        var _loc_5:* = _loc_5;
                        txt22.bold = _loc_5;
                        txt26.bold = _loc_5;
                    }
                    break;
                }
                case 5:
                {
                    if (this._isOther == false)
                    {
                        this.fashion.openRefresh(0);
                        if (Config.hexie)
                        {
                            rolelabel.text = "时  装";
                        }
                        else
                        {
                            rolelabel.text = "时  装";
                        }
                        tbtn1.selected = false;
                        this.armrole.visible = false;
                        tbtn2.selected = false;
                        tbtn3.selected = false;
                        tbtn4.selected = false;
                        tbtn5.selected = true;
                        this.zhuansheng.visible = false;
                        if (this._roleContainer)
                        {
                            this._roleContainer.visible = false;
                        }
                        this.baoshi.visible = false;
                        this.neigong.visible = false;
                        this.feishen.visible = false;
                        this.fashion.visible = true;
                        tbtn6.selected = false;
                        txt25.color = "0xb9774b";
                        var _loc_5:String = "0x977f6c";
                        txt24.color = "0x977f6c";
                        var _loc_5:* = _loc_5;
                        txt21.color = _loc_5;
                        var _loc_5:* = _loc_5;
                        txt23.color = _loc_5;
                        var _loc_5:* = _loc_5;
                        txt22.color = _loc_5;
                        txt26.color = _loc_5;
                        txt25.bold = true;
                        var _loc_5:Boolean = false;
                        txt24.bold = false;
                        var _loc_5:* = _loc_5;
                        txt21.bold = _loc_5;
                        var _loc_5:* = _loc_5;
                        txt23.bold = _loc_5;
                        var _loc_5:* = _loc_5;
                        txt22.bold = _loc_5;
                        txt26.bold = _loc_5;
                    }
                    break;
                }
                case 6:
                {
                    if (this._isOther == false)
                    {
                        _loc_3 = this._openLevel["role"][6].rein;
                        _loc_4 = UserData.getUserData("rein");
                        if (_loc_4 < _loc_3)
                        {
                            ModelProxy.change("movetips", "error", "您的转生等级不足,需要转生等级" + _loc_3 + "转");
                        }
                        else
                        {
                            this.feishen.visible = true;
                            this.feishen.init(null);
                            tbtn1.selected = false;
                            this.armrole.visible = false;
                            tbtn2.selected = false;
                            this.zhuansheng.visible = false;
                            this.neigong.visible = false;
                            tbtn5.selected = false;
                            if (this._roleContainer)
                            {
                                this._roleContainer.visible = false;
                            }
                            tbtn3.selected = false;
                            this.baoshi.visible = false;
                            tbtn6.selected = true;
                            tbtn4.selected = false;
                            this.baoshi.openRefresh();
                            rolelabel.text = "飞   升";
                            this.fashion.visible = false;
                            txt26.color = "0xb9774b";
                            var _loc_5:String = "0x977f6c";
                            txt24.color = "0x977f6c";
                            var _loc_5:* = _loc_5;
                            txt25.color = _loc_5;
                            var _loc_5:* = _loc_5;
                            txt21.color = _loc_5;
                            var _loc_5:* = _loc_5;
                            txt22.color = _loc_5;
                            txt23.color = _loc_5;
                            txt26.bold = true;
                            var _loc_5:Boolean = false;
                            txt24.bold = false;
                            var _loc_5:* = _loc_5;
                            txt25.bold = _loc_5;
                            var _loc_5:* = _loc_5;
                            txt21.bold = _loc_5;
                            var _loc_5:* = _loc_5;
                            txt22.bold = _loc_5;
                            txt23.bold = _loc_5;
                        }
                    }
                }
                default:
                {
                    break;
                    break;
                }
            }
            if (PluginManager.instance.getPluginState("bag") == "open")
            {
                PluginManager.instance.movePluginWithBag("role");
            }
            return;
        }// end function

        public function openRefresh(param1:Object = null) : void
        {
            var _loc_2:Output = null;
            this.fashion.clearModel();
            this.roleBuffer.updateRoleLevel();
            var _loc_3:* = UserData.getBagData("intel");
            var _loc_4:* = UserData.getUserData("level");
            var _loc_5:* = this._openLevel["role"][4].level;
            var _loc_6:* = this._openLevel["role"][3].level;
            var _loc_7:* = this._openLevel["role"][6].level;
            this._zhanliid = 0;
            if (param1 == null || param1.hasOwnProperty("showbattle"))
            {
                _loc_2 = new Output();
                PluginManager.instance.sendToBufferServer("role", CMDRole.Init, _loc_2);
                this.tbHandler(1);
                this._isOther = false;
                tbtn2.visible = true;
                txt22.visible = true;
                if (this.roleRein > 0)
                {
                    var _loc_10:Boolean = true;
                    txt23.visible = true;
                    tbtn3.visible = _loc_10;
                }
                else if (this.roleRein == 0 && this.roleLevel >= _loc_5)
                {
                    var _loc_10:Boolean = true;
                    txt23.visible = true;
                    tbtn3.visible = _loc_10;
                }
                else
                {
                    var _loc_10:Boolean = false;
                    txt23.visible = false;
                    tbtn3.visible = _loc_10;
                }
                if (this.roleRein > 0)
                {
                    var _loc_10:Boolean = true;
                    txt25.visible = true;
                    tbtn5.visible = _loc_10;
                    this.setXY1();
                }
                else if (this.roleRein == 0 && this.roleLevel >= _loc_6)
                {
                    var _loc_10:Boolean = true;
                    txt25.visible = true;
                    tbtn5.visible = _loc_10;
                    this.setXY1();
                }
                else
                {
                    var _loc_10:Boolean = false;
                    txt25.visible = false;
                    tbtn5.visible = _loc_10;
                    this.setXY2();
                }
                if (_loc_4 >= _loc_7)
                {
                    var _loc_10:Boolean = true;
                    txt26.visible = true;
                    tbtn6.visible = _loc_10;
                }
                else
                {
                    var _loc_10:Boolean = false;
                    txt26.visible = false;
                    tbtn6.visible = _loc_10;
                }
                tbtn4.visible = true;
                txt24.visible = true;
                if (param1 && param1.hasOwnProperty("showbattle"))
                {
                    this._zhanliid = param1.showbattle;
                }
            }
            else if (int(param1) == 1 || int(param1) == 2 || int(param1) == 3 || int(param1) == 5 || int(param1) == 4)
            {
                this.tbHandler(int(param1));
                _loc_2 = new Output();
                PluginManager.instance.sendToBufferServer("role", CMDRole.Init, _loc_2);
                this._isOther = false;
                var _loc_10:Boolean = true;
                txt22.visible = true;
                tbtn2.visible = _loc_10;
                var _loc_10:Boolean = true;
                txt24.visible = true;
                tbtn4.visible = _loc_10;
                if (this.roleRein > 0)
                {
                    var _loc_10:Boolean = true;
                    txt23.visible = true;
                    tbtn3.visible = _loc_10;
                }
                else if (this.roleRein == 0 && this.roleLevel >= _loc_5)
                {
                    var _loc_10:Boolean = true;
                    txt23.visible = true;
                    tbtn3.visible = _loc_10;
                }
                else
                {
                    var _loc_10:Boolean = false;
                    txt23.visible = false;
                    tbtn3.visible = _loc_10;
                }
                if (this.roleRein > 0)
                {
                    var _loc_10:Boolean = true;
                    txt25.visible = true;
                    tbtn5.visible = _loc_10;
                    this.setXY1();
                }
                else if (this.roleRein == 0 && this.roleLevel >= _loc_6)
                {
                    var _loc_10:Boolean = true;
                    txt25.visible = true;
                    tbtn5.visible = _loc_10;
                    this.setXY1();
                }
                else
                {
                    var _loc_10:Boolean = false;
                    txt25.visible = false;
                    tbtn5.visible = _loc_10;
                    this.setXY2();
                }
            }
            else if (param1.hasOwnProperty("page"))
            {
                this.tbHandler(5);
                this.fashion.tab_shizhuang.selectedIndex = int(param1.page);
            }
            else
            {
                this.Init(param1.role, null, param1);
                this.tbHandler(1);
                this._isOther = true;
                tbtn2.visible = false;
                txt22.visible = false;
                this.zhuansheng.visible = false;
                tbtn3.visible = false;
                baoshiBox.visible = false;
                txt23.visible = false;
                this.baoshi.visible = false;
                tbtn5.visible = false;
                txt25.visible = false;
                tbtn4.visible = false;
                txt24.visible = false;
                this.fashion.visible = false;
                this.neigong.visible = false;
                tbtn6.visible = false;
                txt26.visible = false;
            }
            var _loc_8:* = ModelProxy.getValue("zhuan", "getatt");
            if (ModelProxy.getValue("zhuan", "getatt") == null)
            {
                _loc_8 = new Object();
                _loc_8.reinEnergy = 0;
            }
            this.showRein(_loc_8);
            this.showBaoshiCount();
            var _loc_9:* = UserData.getBagData("flyuppower");
            this.showFlyJ(_loc_9);
            return;
        }// end function

        private function setXY1() : void
        {
            tbtn5.y = 184;
            txt25.y = 189;
            tbtn2.y = 230;
            txt22.y = 236;
            reinJ.y = 224;
            tbtn3.y = 276;
            txt23.y = 281;
            baoshiBox.y = 270;
            return;
        }// end function

        private function setXY2() : void
        {
            tbtn2.y = 184;
            txt22.y = 189;
            reinJ.y = 178;
            tbtn3.y = 230;
            txt23.y = 236;
            baoshiBox.y = 224;
            return;
        }// end function

        public function SetGuanzhi(param1:int) : void
        {
            if (this.gzConfig == null)
            {
                this.gzConfig = ConfigDictionary.data.guanwei;
            }
            if (param1 > 0 && this.gzConfig[param1])
            {
            }
            return;
        }// end function

        public function setUnionName(param1:String) : void
        {
            return;
        }// end function

        public function Init(param1:Object, param2:Object = null, param3:Object = null) : void
        {
            var _loc_7:Object = null;
            if (param3 == null)
            {
                this._roleData = ObjectUtil.clone(param1);
                this._armsArr = ModelProxy.getValue("data", "arms");
                ModelProxy.change("data", "otheruser", null);
                this._vipatt = VipCheck.hasfuncAttme(20);
                this._vipattstr = VipCheck.hasfuncAttme(15);
            }
            else
            {
                this._roleData = param3.role;
                this._armsArr = param3.arms;
                this.otherfashion = param3.fashion;
                this.otherSkills = param3.skills;
                ModelProxy.change("data", "otheruser", this._roleData);
                _loc_7 = param3.vip;
                this._vipatt = VipCheck.hasfuncAtt(int(_loc_7), int(_loc_7), 20);
                this._vipattstr = VipCheck.hasfuncAtt(int(_loc_7), int(_loc_7), 15);
            }
            var _loc_4:int = 1;
            while (_loc_4 <= 15)
            {
                
                if (this._armsArr[_loc_4])
                {
                    this._armsArr[_loc_4].pos = _loc_4;
                }
                _loc_4++;
            }
            this._baseability = this._roleData.ability;
            this._buffability = this._roleData.abilityBuf;
            this.updatePro();
            this.updateUser(this._roleData);
            var _loc_5:* = this._roleData.career + "_" + this._roleData.sex;
            if (this._curimg != _loc_5)
            {
                this._curimg = _loc_5;
                this.rolehead.url = Config.getUrl(HEAD_URL + _loc_5 + ".png");
            }
            this.updateArm();
            this.UpdateAbility(this._baseability.nbValue + this._buffability.nbValue);
            var _loc_6:* = new Object();
            if (param3 == null)
            {
                _loc_6.user = UserData.getUserData();
                _loc_6.arms = ModelProxy.getValue("data", "arms");
                if (this._zhanliid > 0)
                {
                    this.txt1ClickHandler(null);
                    this._zhanliid = 0;
                }
            }
            else
            {
                _loc_6.user = param3.role;
                _loc_6.arms = param3.arms;
                _loc_6.fashions = param3.fashion;
                this.updateviptxt(param3.vip);
            }
            this.addRoleView(_loc_6);
            if (!this.cfgitem)
            {
                this.cfgitem = ConfigDictionary.data.item;
            }
            return;
        }// end function

        public function updaterein() : void
        {
            return;
        }// end function

        public function updatePro() : void
        {
            if (!this._baseability)
            {
                return;
            }
            if (!this._baseability.hasOwnProperty("hp"))
            {
                this._baseability.hp = this._baseability.maxHp;
            }
            if (!this._baseability.hasOwnProperty("mp"))
            {
                this._baseability.mp = this._baseability.maxMp;
            }
            this.armrole._redNum.text = this._baseability.hp + "/" + this._baseability.maxHp;
            this.armrole._blueNum.text = this._baseability.mp + "/" + this._baseability.maxMp;
            if (this._baseability.hp < 0 && this._baseability.maxHp < 0)
            {
                this.armrole._redquad.scaleX = this._baseability.maxHp / this._baseability.hp;
            }
            else
            {
                this.armrole._redquad.scaleX = this._baseability.hp / this._baseability.maxHp;
            }
            if (this.armrole._redquad.scaleX < 0)
            {
                this.armrole._redquad.scaleX = 0;
            }
            else if (this.armrole._redquad.scaleX > 1)
            {
                this.armrole._redquad.scaleX = 1;
            }
            if (this._baseability.mp < 0 && this._baseability.maxMp < 0)
            {
                this.armrole._bluequad.scaleX = this._baseability.maxMp / this._baseability.mp;
            }
            else
            {
                this.armrole._bluequad.scaleX = this._baseability.mp / this._baseability.maxMp;
            }
            if (this.armrole._bluequad.scaleX < 0)
            {
                this.armrole._bluequad.scaleX = 0;
            }
            else if (this.armrole._bluequad.scaleX > 1)
            {
                this.armrole._bluequad.scaleX = 1;
            }
            this.armrole._neiliNum.text = this._baseability.innerPower + "/" + this._baseability.maxInnerPower;
            if (this._baseability.innerPower < 0 && this._baseability.maxInnerPower < 0)
            {
                this.armrole._neiliquad.scaleX = this._baseability.maxInnerPower / this._baseability.innerPower;
            }
            else
            {
                this.armrole._neiliquad.scaleX = this._baseability.innerPower / this._baseability.maxInnerPower;
            }
            ModelProxy.change("role", "neigong", this._baseability.innerPower);
            if (this.armrole._neiliquad.scaleX < 0)
            {
                this.armrole._neiliquad.scaleX = 0;
            }
            else if (this.armrole._neiliquad.scaleX > 1)
            {
                this.armrole._neiliquad.scaleX = 1;
            }
            if (this._buffability && this._buffability.hasOwnProperty("phyAtt"))
            {
                this.armrole._txtphyAtt.text = this.numLine(this._baseability.phyAtt + Number(this._buffability.phyAtt), this._vipatt, this._vipattstr);
            }
            else
            {
                this.armrole._txtphyAtt.text = this.numLine(this._baseability.phyAtt, this._vipatt, this._vipattstr);
            }
            if (this._buffability && this._buffability.hasOwnProperty("taoAtt"))
            {
                this.armrole._txttaoAtt.text = this.numLine(this._baseability.taoAtt + Number(this._buffability.taoAtt), this._vipatt, this._vipattstr);
            }
            else
            {
                this.armrole._txttaoAtt.text = this.numLine(this._baseability.taoAtt, this._vipatt, this._vipattstr);
            }
            if (this._buffability && this._buffability.hasOwnProperty("phyDef"))
            {
                this.armrole._txtphyDef.text = this.numLine(this._baseability.phyDef + Number(this._buffability.phyDef));
            }
            else
            {
                this.armrole._txtphyDef.text = this.numLine(this._baseability.phyDef);
            }
            if (this._buffability && this._buffability.hasOwnProperty("magicAtt"))
            {
                this.armrole._txtmagicAtt.text = this.numLine(this._baseability.magicAtt + Number(this._buffability.magicAtt), this._vipatt, this._vipattstr);
            }
            else
            {
                this.armrole._txtmagicAtt.text = this.numLine(this._baseability.magicAtt);
            }
            if (this._buffability && this._buffability.hasOwnProperty("magicDef"))
            {
                this.armrole._txtmagicDef.text = this.numLine(this._baseability.magicDef + Number(this._buffability.magicDef));
            }
            else
            {
                this.armrole._txtmagicDef.text = this.numLine(this._roleData.magicDef);
            }
            if (this._buffability)
            {
                this.armrole._txtpureatk.text = this._baseability.pureatk + int(this._buffability.pureatk);
            }
            else
            {
                this.armrole._txtpureatk.text = this._baseability.pureatk;
            }
            if (this._buffability)
            {
                this.armrole._txtattackSpeed.text = this._baseability.attackSpeed + int(this._buffability.attackSpeed);
            }
            else
            {
                this.armrole._txtattackSpeed.text = this._baseability.attackSpeed;
            }
            if (this._buffability)
            {
                this.armrole._txtbaojiSpeed.text = this._baseability.critical + int(this._buffability.critical);
            }
            else
            {
                this.armrole._txtbaojiSpeed.text = this._baseability.critical;
            }
            var _loc_1:* = UserData.getUserData();
            this.armrole._redtxt.text = _loc_1.pkValue < 0 ? ("无") : (_loc_1.pkValue);
            var _loc_2:int = 0;
            if (this._baseability.luck >= 0)
            {
                this.armrole._txtluck.text = this._baseability.luck;
                this.armrole._txtunluck.text = "0";
            }
            else
            {
                this.armrole._txtluck.text = "0";
                this.armrole._txtunluck.text = String(-this._baseability.luck);
            }
            this.armrole._txtaccurate.text = this._baseability.accurate;
            this.armrole._txtdodge.text = this._baseability.dodge;
            this.armrole._txtpkAtk.text = this._baseability.pkAtk / 100 + "%";
            this.armrole._txtpkDef.text = this._baseability.pkDef / 100 + "%";
            this.armrole._txtcritical.text = this._baseability.critdmg;
            var _loc_3:int = 0;
            var _loc_4:int = 0;
            _loc_3 = _loc_3 + int(this._baseability.pureatk);
            _loc_4 = _loc_4 + int(this._baseability.puredef);
            var _loc_5:* = UserData.getBagData("honor");
            this.armrole._rongyutxt.text = _loc_5.toString();
            return;
        }// end function

        public function UpdateDurables(param1:Object = null) : void
        {
            var _loc_3:String = null;
            var _loc_4:Object = null;
            this._armsArr = ModelProxy.getValue("data", "arms");
            var _loc_2:int = 1;
            while (_loc_2 <= 14)
            {
                
                if (this._armsArr[_loc_2])
                {
                    this._armsArr[_loc_2].pos = _loc_2;
                }
                _loc_2++;
            }
            for (_loc_3 in param1)
            {
                
                for each (_loc_4 in this._armsArr)
                {
                    
                    if (_loc_4 != null && _loc_4.id == _loc_3)
                    {
                        _loc_4.durable = param1[_loc_3];
                        break;
                    }
                }
            }
            this.updateArm();
            return;
        }// end function

        public function updateArm() : void
        {
            var _loc_1:int = 1;
            while (_loc_1 <= 20)
            {
                
                if (this.armrole["_Arm" + _loc_1] && this.armrole["_Arm" + _loc_1] as ArmItemCtrl)
                {
                    if (!this._armsArr[_loc_1])
                    {
                        this._armsArr[_loc_1] = new Object();
                    }
                    this._armsArr[_loc_1].pos = _loc_1;
                    (this.armrole["_Arm" + _loc_1] as ArmItemCtrl).data = this._armsArr[_loc_1];
                }
                _loc_1++;
            }
            return;
        }// end function

        public function UpdateHpMp(param1:Object) : void
        {
            if (!this.visible)
            {
                return;
            }
            if (this._baseability == null)
            {
                return;
            }
            this._baseability.hp = param1.hp;
            this._baseability.mp = param1.mp;
            this._baseability.innerPower = param1.innerPower;
            this.armrole._redNum.text = this._baseability.hp + "/" + this._baseability.maxHp;
            this.armrole._blueNum.text = this._baseability.mp + "/" + this._baseability.maxMp;
            if (param1.hp < 0 && this._baseability.maxHp < 0)
            {
                this.armrole._redquad.scaleX = this._baseability.maxHp / this._baseability.hp;
            }
            else
            {
                this.armrole._redquad.scaleX = this._baseability.hp / this._baseability.maxHp;
            }
            if (this.armrole._redquad.scaleX < 0)
            {
                this.armrole._redquad.scaleX = 0;
            }
            else if (this.armrole._redquad.scaleX > 1)
            {
                this.armrole._redquad.scaleX = 1;
            }
            if (param1.mp < 0 && this._baseability.maxMp < 0)
            {
                this.armrole._bluequad.scaleX = this._baseability.maxMp / this._baseability.mp;
            }
            else
            {
                this.armrole._bluequad.scaleX = this._baseability.mp / this._baseability.maxMp;
            }
            if (this.armrole._bluequad.scaleX < 0)
            {
                this.armrole._bluequad.scaleX = 0;
            }
            else if (this.armrole._bluequad.scaleX > 1)
            {
                this.armrole._bluequad.scaleX = 1;
            }
            this.armrole._neiliNum.text = this._baseability.innerPower + "/" + this._baseability.maxInnerPower;
            if (this._baseability.innerPower < 0 && this._baseability.maxInnerPower < 0)
            {
                this.armrole._neiliquad.scaleX = this._baseability.maxInnerPower / this._baseability.innerPower;
            }
            else
            {
                this.armrole._neiliquad.scaleX = this._baseability.innerPower / this._baseability.maxInnerPower;
            }
            ModelProxy.change("role", "neigong", this._baseability.innerPower);
            if (this.armrole._neiliquad.scaleX < 0)
            {
                this.armrole._neiliquad.scaleX = 0;
            }
            else if (this.armrole._neiliquad.scaleX > 1)
            {
                this.armrole._neiliquad.scaleX = 1;
            }
            return;
        }// end function

        public function updateAbilityBuf(param1:Object) : void
        {
            var _loc_2:Object = null;
            if (this._isOther)
            {
                return;
            }
            if (this._buffability == null)
            {
                this._buffability = new Object();
            }
            for (_loc_2 in param1)
            {
                
                this._buffability[_loc_2] = param1[_loc_2];
            }
            this.updatePro();
            return;
        }// end function

        public function updateUser(param1:Object = null) : void
        {
            var _loc_5:Image = null;
            var _loc_6:String = null;
            var _loc_7:int = 0;
            if (param1 == null)
            {
                param1 = UserData.getUserData();
            }
            if (this.gzConfig == null)
            {
                this.gzConfig = ConfigDictionary.data.guanwei;
            }
            if (UIGlobel.getCareer(param1.career) == "法师")
            {
                if (UIGlobel.getCareer(param1.career) == "道士")
                {
                    if (UIGlobel.getCareer(param1.career) == "战士")
                    {
                        _loc_5 = this.armrole.getChildByName("img_head") as Image;
                    }
                }
            }
            this.rein = param1.rein;
            this.roleLevel = param1.level;
            this.armrole._levelNum.text = String(this.roleLevel);
            var _loc_2:* = ConfigDictionary.data.level[param1.level];
            this.roleRein = param1.rein;
            if (this.rein > 0)
            {
                _loc_6 = this.rein.toString();
                _loc_7 = 0;
                while (_loc_7 < _loc_6.length)
                {
                    
                    if (_loc_6.length == 1)
                    {
                    }
                    _loc_7++;
                }
            }
            var _loc_3:* = this._openLevel["role"][4].level;
            var _loc_4:* = this._openLevel["role"][3].level;
            if (this.roleRein > 0)
            {
                var _loc_8:Boolean = true;
                txt23.visible = true;
                tbtn3.visible = _loc_8;
            }
            else if (this.roleRein == 0 && this.roleLevel >= _loc_3)
            {
                var _loc_8:Boolean = true;
                txt23.visible = true;
                tbtn3.visible = _loc_8;
            }
            else
            {
                var _loc_8:Boolean = false;
                txt23.visible = false;
                tbtn3.visible = _loc_8;
            }
            if (this.roleRein > 0)
            {
                var _loc_8:Boolean = true;
                txt25.visible = true;
                tbtn5.visible = _loc_8;
                this.setXY1();
            }
            else if (this.roleRein == 0 && this.roleLevel >= _loc_4)
            {
                var _loc_8:Boolean = true;
                txt25.visible = true;
                tbtn5.visible = _loc_8;
                this.setXY1();
            }
            else
            {
                var _loc_8:Boolean = false;
                txt25.visible = false;
                tbtn5.visible = _loc_8;
                this.setXY2();
            }
            this.updateviptxt();
            return;
        }// end function

        private function setImg(param1:String, param2:Image) : void
        {
            var _loc_3:* = "assets/images/head/" + param1 + ".png";
            _loc_3 = Config.getUrl(_loc_3, ResourceType.NORMAL);
            App.mloader3.loadBMD(_loc_3, 1, new Handler(this.onComp, [_loc_3, param2]));
            return;
        }// end function

        private function onComp(param1:String, param2:Image, param3:BitmapData) : void
        {
            param2.url = param1;
            return;
        }// end function

        private function updateviptxt(param1:int = -1) : void
        {
            var _loc_2:int = 0;
            if (param1 == -1)
            {
                _loc_2 = VipCheck.checkVipLevel();
                if (_loc_2 > 0)
                {
                    this.armrole.vip_txt.text = "vip" + _loc_2.toString();
                }
                else
                {
                    this.armrole.vip_txt.text = "vip0";
                }
            }
            else
            {
                _loc_2 = param1;
                if (_loc_2 > 0)
                {
                    this.armrole.vip_txt.text = "vip" + _loc_2.toString();
                }
                else
                {
                    this.armrole.vip_txt.text = "vip0";
                }
            }
            return;
        }// end function

        public function UpdateAbility(param1:int) : void
        {
            this.powerSprite.showPower(param1, this.oldPower);
            this.powerSprite2.showPower(param1, this.oldPower);
            this.oldPower = param1;
            return;
        }// end function

        public function updateRole(param1:Object) : void
        {
            this._vipatt = VipCheck.hasfuncAttme(20);
            this._vipattstr = VipCheck.hasfuncAttme(15);
            if (param1.hasOwnProperty("ability"))
            {
                this._baseability = param1.ability;
                this._buffability = param1.abilityBuf;
                this.updatePro();
                this.updateUser(this._roleData);
                this.UpdateAbility(this._baseability.nbValue + this._buffability.nbValue);
            }
            else
            {
                this._baseability = param1;
                this.updatePro();
                this.updateUser(this._roleData);
                this.UpdateAbility(this._baseability.nbValue + this._buffability.nbValue);
            }
            return;
        }// end function

        private function numLine(param1:Number, param2:Number = 0, param3:Number = 0) : String
        {
            var _loc_4:* = int(param1) * (param3 + 100) / 100 + param2;
            var _loc_5:* = param1 / Math.pow(2, 32) * (param3 + 100) / 100 + param2;
            return _loc_4 + " - " + _loc_5;
        }// end function

        public function onArm(param1:Object) : void
        {
            if (this._isOther)
            {
                return;
            }
            this.itemdata = param1;
            var _loc_2:* = param1.pos;
            this.completeHandler(this.moveitme);
            return;
        }// end function

        private function completeHandler(param1) : void
        {
            if (param1)
            {
                if (param1.parent)
                {
                    param1.parent.removeChild(param1);
                }
                param1 = null;
            }
            var _loc_2:* = this.itemdata.pos;
            if (_loc_2 == 0 || _loc_2 >= 100)
            {
                return;
            }
            this.itemdata.data.pos = _loc_2;
            var _loc_3:Boolean = false;
            if (this.armrole["_Arm" + _loc_2] && this.armrole["_Arm" + _loc_2].data && this.itemdata.data && this.armrole["_Arm" + _loc_2].data.id == this.itemdata.data.id)
            {
                _loc_3 = false;
            }
            else
            {
                _loc_3 = true;
            }
            this.armrole["_Arm" + _loc_2].data = this.itemdata.data;
            if (_loc_3)
            {
                if (_loc_2 == 1 || _loc_2 == 15 || _loc_2 == 5)
                {
                    this.refresh();
                }
            }
            return;
        }// end function

        public function offArm(param1:int) : void
        {
            if (this._isOther)
            {
                return;
            }
            if (param1 == 0 || param1 > 100)
            {
                return;
            }
            this.armrole["_Arm" + param1].data = {pos:param1};
            if (param1 == 1 || param1 == 15 || param1 == 5)
            {
                this.refresh();
            }
            return;
        }// end function

        public function BagToRole(param1:Object, param2:Point) : void
        {
            var _loc_4:Point = null;
            var _loc_5:int = 0;
            var _loc_6:Object = null;
            var _loc_3:* = this.globalToLocal(param2);
            if (_loc_3.x < 0 || _loc_3.y < 0)
            {
                ModelProxy.change("bag", "throw", param1.index);
                return;
            }
            if (param2)
            {
                _loc_5 = 1;
                while (_loc_5 <= 20)
                {
                    
                    _loc_4 = this.armrole["_Arm" + _loc_5].globalToLocal(param2);
                    if (_loc_4.x > 0 && _loc_4.y > 0 && _loc_4.x < 46 && _loc_4.y < 45)
                    {
                        _loc_6 = new Object();
                        if (param1[4].cls == 1 && _loc_5 == 8)
                        {
                            return;
                        }
                        _loc_6.pos = _loc_5;
                        _loc_6.armid = param1[0];
                        ModelProxy.change("bag", "putOn", _loc_6);
                        break;
                    }
                    _loc_5++;
                }
            }
            return;
        }// end function

        public function DragOver(param1:Object, param2:Point, param3:String) : void
        {
            var _loc_4:Point = null;
            if (param3 == "bag")
            {
                _loc_4 = this.globalToLocal(param2);
                if (_loc_4.x > 0 && _loc_4.y > 0 && _loc_4.x < this.width && _loc_4.y < this.height)
                {
                    this.BagToRole(param1, param2);
                }
            }
            return;
        }// end function

        public function refresh() : void
        {
            var _loc_1:* = UserData.getUserData();
            var _loc_2:* = new Object();
            _loc_2.user = _loc_1;
            _loc_2.arms = ModelProxy.getValue("data", "arms");
            _loc_2.fashions = ModelProxy.getValue("data", "pfashion");
            this.addRoleView(_loc_2);
            return;
        }// end function

        public function addRoleView(param1:Object) : void
        {
            if (this.role)
            {
                this.role.updateRoel(param1);
            }
            else
            {
                this.role = new SimpleRoleManager(param1, this._roleContainer);
            }
            return;
        }// end function

        public function showArmTZTips() : void
        {
            var _loc_1:int = 0;
            var _loc_2:Object = null;
            var _loc_3:String = null;
            var _loc_4:int = 0;
            var _loc_15:String = null;
            var _loc_16:Object = null;
            var _loc_19:String = null;
            var _loc_21:Object = null;
            var _loc_22:Object = null;
            var _loc_23:int = 0;
            var _loc_24:int = 0;
            var _loc_25:Array = null;
            var _loc_26:int = 0;
            var _loc_27:int = 0;
            var _loc_28:Array = null;
            var _loc_29:int = 0;
            var _loc_30:int = 0;
            var _loc_31:int = 0;
            var _loc_32:int = 0;
            var _loc_33:int = 0;
            var _loc_34:int = 0;
            return;
            var _loc_13:Object = null;
            var _loc_14:Object = null;
            for each (_loc_16 in this.qhtz)
            {
                
                _loc_31 = 2;
                if (_loc_6[_loc_16.lv] >= _loc_16.count)
                {
                    _loc_31 = 8;
                    if (_loc_11 < _loc_16.lv)
                    {
                        var _loc_11:* = _loc_16.lv;
                    }
                    if (_loc_14 == null)
                    {
                        _loc_14 = new Object();
                    }
                    _loc_14.count = _loc_16.count;
                    _loc_14.lv = _loc_16.lv;
                    for (_loc_15 in _loc_16)
                    {
                        
                        if (_loc_15 == "id" || _loc_15 == "count" || _loc_15 == "lv")
                        {
                            continue;
                        }
                        if (_loc_14[_loc_15] == null)
                        {
                            _loc_14[_loc_15] = 0;
                        }
                        _loc_14[_loc_15] = _loc_14[_loc_15] + int(_loc_16[_loc_15]);
                    }
                    continue;
                }
                if (_loc_13 == null)
                {
                    _loc_13 = new Object();
                    for (_loc_15 in _loc_16)
                    {
                        
                        if (_loc_15 == "id" || _loc_15 == "count" || _loc_15 == "lv")
                        {
                            _loc_13[_loc_15] = int(_loc_16[_loc_15]);
                            continue;
                        }
                        if (_loc_14)
                        {
                            _loc_13[_loc_15] = int(_loc_14[_loc_15]) + int(_loc_16[_loc_15]);
                            continue;
                        }
                        _loc_13[_loc_15] = int(_loc_16[_loc_15]);
                    }
                    break;
                }
            }
            var _loc_9:* = _loc_9 + MColor.getHMTL("\n当前效果:\n", 11);
            if (_loc_14 == null)
            {
                _loc_9 = _loc_9 + MColor.getHMTL("无:\n", 1);
            }
            else
            {
                _loc_9 = _loc_9 + MColor.getHMTL(_loc_14.count + "件装备强" + _loc_14.lv, 4);
                _loc_9 = _loc_9 + ("<font color=\'#00ff00\'>  (" + int(_loc_6[_loc_14.lv]) + "/" + _loc_14.count + ")</font>" + MColor.getHMTL("(激活)", 2) + "\n");
                _loc_9 = _loc_9 + this.getInfo(_loc_14, 5);
            }
            if (_loc_13)
            {
                _loc_9 = _loc_9 + MColor.getHMTL("\n下级效果:\n", 11);
                _loc_9 = _loc_9 + MColor.getHMTL(_loc_13.count + "件装备强" + _loc_13.lv, 4);
                _loc_9 = _loc_9 + ("<font color=\'#ff0000\'>  (" + int(_loc_6[_loc_13.lv]) + "/" + _loc_13.count + ")</font>" + MColor.getHMTL("(未激活)", 2) + "\n");
                _loc_32 = 0;
                for each (_loc_33 in this._qhArr)
                {
                    
                    _loc_32++;
                    if (_loc_32 == 8)
                    {
                        _loc_9 = _loc_9 + "\n";
                    }
                    else if (_loc_32 != 1)
                    {
                        _loc_9 = _loc_9 + " ";
                    }
                    if (_loc_5[_loc_33] && _loc_5[_loc_33].superlevel >= _loc_13.lv)
                    {
                        _loc_9 = _loc_9 + MColor.getHMTL(_loc_5[_loc_33].leixing, 7);
                        continue;
                    }
                    if (_loc_5[_loc_33])
                    {
                        _loc_9 = _loc_9 + MColor.getHMTL(_loc_5[_loc_33].leixing, 2);
                        continue;
                    }
                    _loc_9 = _loc_9 + MColor.getHMTL(UIGlobel.getPosName(_loc_33), 2);
                }
                _loc_9 = _loc_9 + "\n";
                _loc_9 = _loc_9 + this.getInfo(_loc_13, 5);
            }
            this._qhtzTips = _loc_9;
            if (_loc_11 > 0)
            {
                _loc_3 = _loc_11.toString();
                _loc_4 = 0;
                while (_loc_4 < _loc_3.length)
                {
                    
                    if (_loc_3.length == 1)
                    {
                    }
                    _loc_4++;
                }
            }
            var _loc_17:Object = null;
            var _loc_18:Object = null;
            var _loc_20:int = 0;
            for each (_loc_21 in this.jdtz)
            {
                
                _loc_34 = 2;
                _loc_1 = 0;
                for (_loc_2 in _loc_7)
                {
                    
                    if (_loc_2 >= _loc_21.lv)
                    {
                        _loc_1 = _loc_1 + _loc_7[_loc_2];
                    }
                }
                if (_loc_1 >= _loc_21.count)
                {
                    _loc_20 = _loc_21.id;
                    _loc_34 = 8;
                    if (_loc_18 == null)
                    {
                        _loc_18 = new Object();
                    }
                    _loc_18.count = _loc_21.count;
                    _loc_18.lv = _loc_21.lv;
                    for (_loc_19 in _loc_21)
                    {
                        
                        if (_loc_19 == "id" || _loc_19 == "count" || _loc_19 == "lv")
                        {
                            continue;
                        }
                        if (_loc_18[_loc_19] == null)
                        {
                            _loc_18[_loc_19] = 0;
                        }
                        _loc_18[_loc_19] = _loc_18[_loc_19] + int(_loc_21[_loc_19]);
                    }
                    continue;
                }
                if (_loc_17 == null)
                {
                    _loc_17 = new Object();
                    for (_loc_19 in _loc_21)
                    {
                        
                        if (_loc_19 == "id" || _loc_19 == "count" || _loc_19 == "lv")
                        {
                            _loc_17[_loc_19] = int(_loc_21[_loc_19]);
                            continue;
                        }
                        if (_loc_18)
                        {
                            _loc_17[_loc_19] = int(_loc_18[_loc_19]) + int(_loc_21[_loc_19]);
                            continue;
                        }
                        _loc_17[_loc_19] = int(_loc_21[_loc_19]);
                    }
                    break;
                }
            }
            var _loc_10:* = _loc_10 + MColor.getHMTL("\n当前效果:\n", 11);
            if (_loc_18 == null)
            {
                _loc_10 = _loc_10 + MColor.getHMTL("无:\n", 1);
            }
            else
            {
                _loc_10 = _loc_10 + MColor.getHMTL(_loc_18.count + "条" + _loc_18.lv + "星以上鉴定属性激活", 4);
                _loc_10 = _loc_10 + ("<font color=\'#00ff00\'>  (" + _loc_18.count + "/" + _loc_18.count + ")</font>" + MColor.getHMTL("(激活)", 2) + "\n");
                _loc_10 = _loc_10 + this.getInfo1(_loc_18, 5);
            }
            if (_loc_17)
            {
                _loc_10 = _loc_10 + MColor.getHMTL("\n下级效果:\n", 11);
                _loc_10 = _loc_10 + MColor.getHMTL(_loc_17.count + "条" + _loc_17.lv + "星以上", 4);
                _loc_1 = 0;
                for (_loc_2 in _loc_7)
                {
                    
                    if (_loc_2 >= _loc_17.lv)
                    {
                        _loc_1 = _loc_1 + _loc_7[_loc_2];
                    }
                }
                _loc_10 = _loc_10 + ("<font color=\'#ff0000\'>  (" + _loc_1 + "/" + _loc_17.count + ")</font>" + MColor.getHMTL("(未激活)", 2) + "\n");
                _loc_10 = _loc_10 + this.getInfo1(_loc_17, 5);
            }
            this._jdtzTips = _loc_10;
            if (_loc_20 > 0)
            {
                _loc_3 = _loc_20.toString();
                _loc_4 = 0;
                while (_loc_4 < _loc_3.length)
                {
                    
                    if (_loc_3.length == 1)
                    {
                    }
                    _loc_4++;
                }
            }
            this.getBstz(_loc_8);
            return;
        }// end function

        private function getBstz(param1:Array) : void
        {
            var _loc_4:String = null;
            var _loc_6:Object = null;
            var _loc_7:String = null;
            var _loc_8:int = 0;
            var _loc_9:int = 0;
            var _loc_10:Object = null;
            var _loc_11:int = 0;
            var _loc_12:String = null;
            var _loc_13:int = 0;
            var _loc_2:Object = null;
            var _loc_3:Object = null;
            var _loc_5:int = 0;
            for each (_loc_6 in this.bstz)
            {
                
                _loc_8 = 2;
                _loc_9 = 0;
                for (_loc_10 in param1)
                {
                    
                    if (_loc_10 >= _loc_6.lv)
                    {
                        _loc_9 = _loc_9 + param1[_loc_10];
                    }
                }
                if (_loc_9 >= _loc_6.count)
                {
                    _loc_5 = _loc_6.id;
                    _loc_8 = 8;
                    if (_loc_3 == null)
                    {
                        _loc_3 = new Object();
                    }
                    _loc_3.count = _loc_6.count;
                    _loc_3.lv = _loc_6.lv;
                    for (_loc_4 in _loc_6)
                    {
                        
                        if (_loc_4 == "id" || _loc_4 == "count" || _loc_4 == "lv")
                        {
                            continue;
                        }
                        if (_loc_3[_loc_4] == null)
                        {
                            _loc_3[_loc_4] = 0;
                        }
                        _loc_3[_loc_4] = _loc_3[_loc_4] + int(_loc_6[_loc_4]);
                    }
                    continue;
                }
                if (_loc_2 == null)
                {
                    _loc_2 = new Object();
                    for (_loc_4 in _loc_6)
                    {
                        
                        if (_loc_4 == "id" || _loc_4 == "count" || _loc_4 == "lv")
                        {
                            _loc_2[_loc_4] = int(_loc_6[_loc_4]);
                            continue;
                        }
                        if (_loc_3)
                        {
                            _loc_2[_loc_4] = int(_loc_3[_loc_4]) + int(_loc_6[_loc_4]);
                            continue;
                        }
                        _loc_2[_loc_4] = int(_loc_6[_loc_4]);
                    }
                    break;
                }
            }
            _loc_7 = "<font color=\'#" + MColor.Newstr6 + "\' size=\'14\'>传说/传奇套装镶嵌加成</font>\n";
            _loc_7 = _loc_7 + MColor.getHMTL("\n当前效果:\n", 11);
            if (_loc_3 == null)
            {
                _loc_7 = _loc_7 + MColor.getHMTL("无:\n", 1);
            }
            else
            {
                _loc_7 = _loc_7 + MColor.getHMTL(_loc_3.count + "颗" + _loc_3.lv + "级宝石", 4);
                _loc_7 = _loc_7 + ("<font color=\'#00ff00\'>  (" + _loc_3.count + "/" + _loc_3.count + ")</font>" + MColor.getHMTL("(激活)", 2) + "\n");
                _loc_7 = _loc_7 + this.getInfo1(_loc_3, 5);
            }
            if (_loc_2)
            {
                _loc_7 = _loc_7 + MColor.getHMTL("\n下级效果:\n", 11);
                _loc_7 = _loc_7 + MColor.getHMTL(_loc_2.count + "颗" + _loc_2.lv + "级宝石激活", 4);
                _loc_11 = 0;
                for (_loc_10 in param1)
                {
                    
                    if (_loc_10 >= _loc_2.lv)
                    {
                        _loc_11 = _loc_11 + param1[_loc_10];
                    }
                }
                _loc_7 = _loc_7 + ("<font color=\'#ff0000\'>  (" + _loc_11 + "/" + _loc_2.count + ")</font>" + MColor.getHMTL("(未激活)", 2) + "\n");
                _loc_7 = _loc_7 + this.getInfo1(_loc_2, 5);
            }
            this._bstzTips = _loc_7;
            if (_loc_5 > 0)
            {
                _loc_12 = _loc_5.toString();
                _loc_13 = 0;
                while (_loc_13 < _loc_12.length)
                {
                    
                    if (_loc_12.length == 1)
                    {
                    }
                    _loc_13++;
                }
            }
            return;
        }// end function

        public function showFashtionTips(param1:Object) : void
        {
            var _loc_2:int = 0;
            var _loc_3:Object = null;
            var _loc_4:String = null;
            var _loc_16:Object = null;
            var _loc_20:Object = null;
            var _loc_21:int = 0;
            var _loc_22:String = null;
            var _loc_23:int = 0;
            var _loc_24:int = 0;
            var _loc_5:int = 2;
            var _loc_6:Array = [0, 0];
            var _loc_7:* = ConfigDictionary.data.designertz;
            var _loc_8:* = ConfigDictionary.data.fashiontz;
            var _loc_9:* = "<font color=\'#" + MColor.Newstr6 + "\' size=\'14\'>衣柜加成属性</font>\n";
            _loc_9 = "<font color=\'#" + MColor.Newstr6 + "\' size=\'14\'>衣柜加成属性</font>\n" + MColor.getHMTL("\n当前效果:\n", 11);
            var _loc_10:* = new Object();
            var _loc_11:int = -1;
            _loc_2 = 1;
            while (_loc_2 <= 5)
            {
                
                _loc_3 = param1["r" + _loc_2];
                if (_loc_3)
                {
                    _loc_21 = _loc_3[0];
                    if (_loc_11 == -1)
                    {
                        _loc_11 = _loc_21;
                    }
                    if (_loc_21 < _loc_11)
                    {
                        _loc_11 = _loc_21;
                    }
                }
                else
                {
                    _loc_11 = 0;
                    break;
                }
                _loc_2++;
            }
            var _loc_12:Object = null;
            var _loc_13:Object = null;
            var _loc_14:int = 0;
            var _loc_15:int = 0;
            _loc_2 = 1;
            while (_loc_2 < _loc_7.length)
            {
                
                _loc_16 = _loc_7[_loc_2];
                if (_loc_11 >= _loc_16.lv && _loc_16["nextindex"] != 0)
                {
                    if (_loc_6[0] <= _loc_16.lv)
                    {
                        _loc_6[0] = _loc_16.lv;
                    }
                    _loc_5 = 8;
                    if (_loc_13 == null)
                    {
                        _loc_13 = new Object();
                    }
                    _loc_13.count = _loc_16.count;
                    _loc_13.lv = _loc_16.lv;
                    for (_loc_4 in _loc_16)
                    {
                        
                        if (_loc_4 == "id" || _loc_4 == "lv" || _loc_4 == "nextindex")
                        {
                            continue;
                        }
                        if (_loc_13[_loc_4] == null)
                        {
                            _loc_13[_loc_4] = 0;
                        }
                        _loc_13[_loc_4] = int(_loc_16[_loc_4]);
                    }
                    _loc_15 = _loc_16["nextindex"];
                }
                _loc_2++;
            }
            if (_loc_15 == 0)
            {
                _loc_2 = 1;
                while (_loc_2 < _loc_7.length)
                {
                    
                    if (_loc_7[_loc_2]["nextindex"] != 0)
                    {
                        _loc_15 = _loc_7[_loc_2]["nextindex"];
                        break;
                    }
                    _loc_2++;
                }
            }
            if (_loc_12 == null)
            {
                _loc_16 = _loc_7[_loc_15];
                if (_loc_16 != null)
                {
                    _loc_6[1] = _loc_16.lv;
                    _loc_12 = new Object();
                    for (_loc_4 in _loc_16)
                    {
                        
                        if (_loc_4 == "id" || _loc_4 == "lv")
                        {
                            _loc_12[_loc_4] = int(_loc_16[_loc_4]);
                            continue;
                        }
                        if (_loc_13)
                        {
                            _loc_12[_loc_4] = int(_loc_16[_loc_4]);
                            continue;
                        }
                        _loc_12[_loc_4] = int(_loc_16[_loc_4]);
                    }
                }
            }
            if (_loc_13 == null)
            {
                _loc_9 = _loc_9 + MColor.getHMTL("无:\n", 1);
            }
            else
            {
                _loc_9 = _loc_9 + MColor.getHMTL("所拥有衣柜达到 " + _loc_6[0] + "级", 4);
                _loc_9 = _loc_9 + ("<font color=\'#00ff00\'>  (5/5)</font>" + MColor.getHMTL("(激活)", 2) + "\n");
                _loc_9 = _loc_9 + ItemUilt.getInfo(_loc_13, 5);
            }
            if (_loc_6[0] > 0)
            {
                _loc_22 = _loc_6[0].toString();
                _loc_23 = 0;
                while (_loc_23 < _loc_22.length)
                {
                    
                    if (_loc_22.length == 1)
                    {
                    }
                    _loc_23++;
                }
            }
            if (_loc_12)
            {
                _loc_9 = _loc_9 + MColor.getHMTL("\n下级效果:\n", 11);
                _loc_2 = 1;
                while (_loc_2 <= 5)
                {
                    
                    _loc_3 = param1["r" + _loc_2];
                    if (_loc_3)
                    {
                        if (_loc_3[0] >= _loc_6[1])
                        {
                            _loc_14++;
                        }
                    }
                    _loc_2++;
                }
                _loc_9 = _loc_9 + MColor.getHMTL("所拥有衣柜达到 " + _loc_6[1] + "级", 4);
                _loc_9 = _loc_9 + ("<font color=\'#ff0000\'>  (" + _loc_14 + "/5)</font>" + MColor.getHMTL("(未激活)", 2) + "\n");
                _loc_24 = 0;
                _loc_2 = 1;
                while (_loc_2 <= 5)
                {
                    
                    _loc_3 = param1["r" + _loc_2];
                    if (_loc_3)
                    {
                        if (_loc_3[0] >= _loc_6[1])
                        {
                            _loc_9 = _loc_9 + (MColor.getHMTL(this._room[_loc_2], 7) + "  ");
                        }
                        else
                        {
                            _loc_9 = _loc_9 + (MColor.getHMTL(this._room[_loc_2], 2) + "  ");
                        }
                    }
                    else
                    {
                        _loc_9 = _loc_9 + (MColor.getHMTL(this._room[_loc_2], 2) + "  ");
                    }
                    _loc_2++;
                }
                _loc_9 = _loc_9 + "\n";
                _loc_9 = _loc_9 + ItemUilt.getInfo(_loc_12, 5);
            }
            _loc_9 = _loc_9 + ("\n<font color=\'#" + MColor.Newstr6 + "\' size=\'14\'>时装加成属性</font>\n");
            _loc_9 = _loc_9 + MColor.getHMTL("\n当前效果:\n", 11);
            var _loc_17:* = param1["wr"];
            var _loc_18:int = 0;
            var _loc_19:* = (ModelProxy.getValue("data", "servertime") + getTimer()) / 1000;
            for each (_loc_20 in _loc_17)
            {
                
                if (_loc_19 > _loc_20 && _loc_20 > 0)
                {
                    continue;
                }
                _loc_18++;
            }
            _loc_12 = null;
            _loc_13 = null;
            _loc_2 = 1;
            while (_loc_2 < _loc_8.length)
            {
                
                _loc_16 = _loc_8[_loc_2];
                if (_loc_18 >= _loc_16.count)
                {
                    _loc_6[0] = _loc_16.count;
                    _loc_5 = 8;
                    if (_loc_13 == null)
                    {
                        _loc_13 = new Object();
                    }
                    _loc_13.count = _loc_16.count;
                    for (_loc_4 in _loc_16)
                    {
                        
                        if (_loc_4 == "id" || _loc_4 == "count")
                        {
                            continue;
                        }
                        if (_loc_13[_loc_4] == null)
                        {
                            _loc_13[_loc_4] = 0;
                        }
                        _loc_13[_loc_4] = int(_loc_16[_loc_4]);
                    }
                }
                else if (_loc_12 == null)
                {
                    _loc_6[1] = _loc_16.count;
                    _loc_12 = new Object();
                    for (_loc_4 in _loc_16)
                    {
                        
                        if (_loc_4 == "id" || _loc_4 == "count")
                        {
                            _loc_12[_loc_4] = int(_loc_16[_loc_4]);
                            continue;
                        }
                        if (_loc_13)
                        {
                            _loc_12[_loc_4] = int(_loc_16[_loc_4]);
                            continue;
                        }
                        _loc_12[_loc_4] = int(_loc_16[_loc_4]);
                    }
                    break;
                }
                _loc_2++;
            }
            if (_loc_13 == null)
            {
                _loc_9 = _loc_9 + MColor.getHMTL("无:\n", 1);
            }
            else
            {
                _loc_9 = _loc_9 + MColor.getHMTL("收集任意时装形象" + _loc_6[0] + "件", 4);
                _loc_9 = _loc_9 + ("<font color=\'#00ff00\'>  (" + _loc_18 + "/" + _loc_6[0] + ")</font>" + MColor.getHMTL("(激活)", 2) + "\n");
                _loc_9 = _loc_9 + ItemUilt.getInfo(_loc_13, 5);
            }
            if (_loc_12)
            {
                _loc_9 = _loc_9 + MColor.getHMTL("\n下级效果:\n", 11);
                _loc_9 = _loc_9 + MColor.getHMTL("收集任意时装形象" + _loc_6[1] + "件", 4);
                _loc_9 = _loc_9 + ("<font color=\'#ff0000\'>  (" + _loc_18 + "/" + _loc_6[1] + ")</font>" + MColor.getHMTL("(未激活)", 2) + "\n");
                _loc_9 = _loc_9 + ItemUilt.getInfo(_loc_12, 5);
            }
            ModelProxy.change("tips", "normal", _loc_9);
            return;
        }// end function

        private function getInfo1(param1:Object, param2:int) : String
        {
            var _loc_3:String = "";
            if (param1.csatk > 0)
            {
                _loc_3 = _loc_3 + MColor.getHMTL("增加传说装备最大攻击 " + param1.csatk + "%\n", param2);
            }
            if (param1.csdef > 0)
            {
                _loc_3 = _loc_3 + MColor.getHMTL("增加传说装备最大防御 " + param1.csdef + "%\n", param2);
            }
            if (param1.cshp > 0)
            {
                _loc_3 = _loc_3 + MColor.getHMTL("增加传说装备最大生命 " + param1.cshp + "%\n", param2);
            }
            if (param1.csmp > 0)
            {
                _loc_3 = _loc_3 + MColor.getHMTL("增加传说装备最大魔法 " + param1.csmp + "%\n", param2);
            }
            if (param1.cqatk > 0)
            {
                _loc_3 = _loc_3 + MColor.getHMTL("增加传奇装备最大攻击 " + param1.cqatk + "%\n", param2);
            }
            if (param1.cqdef > 0)
            {
                _loc_3 = _loc_3 + MColor.getHMTL("增加传奇装备最大防御 " + param1.cqdef + "%\n", param2);
            }
            if (param1.cqhp > 0)
            {
                _loc_3 = _loc_3 + MColor.getHMTL("增加传奇装备最大生命 " + param1.cqhp + "%\n", param2);
            }
            if (param1.cqmp > 0)
            {
                _loc_3 = _loc_3 + MColor.getHMTL("增加传奇装备最大魔法 " + param1.cqmp + "%\n", param2);
            }
            return _loc_3;
        }// end function

        private function getInfo(param1:Object, param2:int) : String
        {
            var _loc_3:String = "";
            if (param1.att > 0)
            {
                _loc_3 = _loc_3 + MColor.getHMTL("增加全攻击" + param1.att + "\n", param2);
            }
            if (param1.def > 0)
            {
                _loc_3 = _loc_3 + MColor.getHMTL("增加全防御" + param1.def + "\n", param2);
            }
            if (param1.luck > 0)
            {
                _loc_3 = _loc_3 + MColor.getHMTL("增加幸运" + param1.luck + "\n", param2);
            }
            if (param1.crit > 0)
            {
                _loc_3 = _loc_3 + MColor.getHMTL("增加暴击率" + param1.crit + "\n", param2);
            }
            if (param1.critrate > 0)
            {
                _loc_3 = _loc_3 + MColor.getHMTL("增加暴击伤害" + param1.critrate + "\n", param2);
            }
            if (param1.attackSpeed > 0)
            {
                _loc_3 = _loc_3 + MColor.getHMTL("增加攻速" + param1.attackSpeed + "\n", param2);
            }
            if (param1.accurate > 0)
            {
                _loc_3 = _loc_3 + MColor.getHMTL("增加准确" + param1.accurate + "\n", param2);
            }
            if (param1.dodge > 0)
            {
                _loc_3 = _loc_3 + MColor.getHMTL("增加敏捷" + param1.dodge + "\n", param2);
            }
            if (param1.hp > 0)
            {
                _loc_3 = _loc_3 + MColor.getHMTL("增加生命值" + param1.hp + "\n", param2);
            }
            if (param1.mp > 0)
            {
                _loc_3 = _loc_3 + MColor.getHMTL("增加魔法值" + param1.mp + "\n", param2);
            }
            if (param1.pureatk > 0)
            {
                _loc_3 = _loc_3 + MColor.getHMTL("增加混乱攻击" + param1.pureatk + "\n", param2);
            }
            if (param1.puredef > 0)
            {
                _loc_3 = _loc_3 + MColor.getHMTL("增加混乱防御" + param1.puredef + "\n", param2);
            }
            if (param1.attpercent > 0)
            {
                _loc_3 = _loc_3 + MColor.getHMTL("增加基础攻击" + param1.attpercent + "%\n", param2);
            }
            if (param1.defpercent > 0)
            {
                _loc_3 = _loc_3 + MColor.getHMTL("增加基础防御" + param1.defpercent + "%\n", param2);
            }
            if (param1.hppercent > 0)
            {
                _loc_3 = _loc_3 + MColor.getHMTL("增加基础生命值" + param1.hppercent + "%\n", param2);
            }
            if (param1.mppercent > 0)
            {
                _loc_3 = _loc_3 + MColor.getHMTL("增加基础魔法值" + param1.mppercent + "%\n", param2);
            }
            return _loc_3;
        }// end function

        public function showRein(param1:Object) : void
        {
            var _loc_7:int = 0;
            if (this.visible == false)
            {
                return;
            }
            reinJ.visible = false;
            var _loc_2:* = int(UserData.getUserData("level"));
            if (_loc_2 < 80)
            {
                return;
            }
            var _loc_3:* = int(UserData.getUserData("rein"));
            if (_loc_3 >= 15)
            {
                return;
            }
            var _loc_4:* = ConfigDictionary.data.rein;
            var _loc_5:* = param1.reinEnergy;
            var _loc_6:int = 0;
            if (_loc_3 < 15)
            {
                _loc_7 = _loc_3;
                while (_loc_7 <= 15)
                {
                    
                    if (_loc_5 >= _loc_4[_loc_7].needEnergy)
                    {
                        _loc_5 = _loc_5 - int(_loc_4[_loc_7].needEnergy);
                        _loc_6++;
                    }
                    _loc_7++;
                }
            }
            if (_loc_6 > 0)
            {
                reinJ.visible = true;
                reinCount.y = 1.5;
                reinCount.text = "1";
            }
            return;
        }// end function

        public function showFlyJ(param1:int) : void
        {
            var _loc_4:int = 0;
            var _loc_5:int = 0;
            var _loc_6:Object = null;
            var _loc_7:Object = null;
            var _loc_8:int = 0;
            var _loc_9:int = 0;
            var _loc_10:int = 0;
            if (this.visible == false)
            {
                return;
            }
            feishenJ.visible = false;
            var _loc_2:* = this._openLevel["role"][6].rein;
            var _loc_3:* = this._openLevel["role"][6].level;
            _loc_4 = int(UserData.getUserData("level"));
            _loc_5 = int(UserData.getUserData("rein"));
            if (_loc_4 < _loc_3 || _loc_5 < _loc_2)
            {
                return;
            }
            if (_loc_5 >= 15)
            {
                return;
            }
            _loc_6 = ModelProxy.getValue("feishen", "init");
            _loc_7 = ConfigDictionary.data.feishen;
            _loc_8 = param1;
            _loc_9 = 0;
            if (_loc_5 < 15)
            {
                _loc_10 = _loc_6.fslevel + 1;
                while (_loc_10 <= 37)
                {
                    
                    if (_loc_8 >= _loc_7[_loc_10].needEnergy && _loc_4 >= _loc_7[_loc_10].needLevel && _loc_5 >= _loc_7[_loc_10].needRein)
                    {
                        _loc_8 = _loc_8 - int(_loc_7[_loc_10].needEnergy);
                        _loc_9++;
                    }
                    _loc_10++;
                }
            }
            if (_loc_9 > 0)
            {
                feishenJ.visible = true;
                feishencount.text = "1";
            }
            return;
        }// end function

        public function showBaoshiCount() : void
        {
            var _loc_1:Object = null;
            var _loc_2:int = 0;
            var _loc_3:Array = null;
            var _loc_4:Array = null;
            var _loc_5:Object = null;
            var _loc_6:Array = null;
            var _loc_7:Array = null;
            var _loc_8:Array = null;
            var _loc_9:Array = null;
            var _loc_10:Array = null;
            var _loc_11:Array = null;
            var _loc_12:Array = null;
            var _loc_13:Array = null;
            var _loc_14:int = 0;
            var _loc_15:int = 0;
            var _loc_16:Object = null;
            var _loc_17:int = 0;
            var _loc_18:int = 0;
            var _loc_19:int = 0;
            var _loc_20:int = 0;
            var _loc_21:int = 0;
            var _loc_22:int = 0;
            var _loc_23:int = 0;
            var _loc_24:int = 0;
            var _loc_25:int = 0;
            var _loc_26:int = 0;
            var _loc_27:int = 0;
            var _loc_29:int = 0;
            var _loc_30:int = 0;
            var _loc_31:int = 0;
            var _loc_32:int = 0;
            var _loc_33:String = null;
            var _loc_34:int = 0;
            var _loc_35:Object = null;
            var _loc_36:int = 0;
            if (this.visible == false)
            {
                return;
            }
            _loc_1 = ModelProxy.getValue("data", "BaoshiCount");
            _loc_2 = 0;
            _loc_3 = [];
            _loc_4 = [];
            for each (_loc_5 in _loc_1)
            {
                
                if (_loc_5.itemidList)
                {
                    _loc_4 = _loc_5.itemidList;
                }
                else
                {
                    _loc_4 = _loc_5 as Array;
                }
                if (_loc_4)
                {
                    _loc_32 = 0;
                    while (_loc_32 < _loc_4.length)
                    {
                        
                        if (_loc_4[_loc_32] == 0)
                        {
                            _loc_2 = _loc_2 + 1;
                        }
                        else
                        {
                            _loc_3.push(_loc_4[_loc_32]);
                        }
                        _loc_32++;
                    }
                }
            }
            if (_loc_2 == 0)
            {
                baoshiBox.visible = false;
                return;
            }
            _loc_6 = [];
            _loc_7 = [];
            _loc_8 = [];
            _loc_9 = [];
            _loc_10 = [];
            _loc_11 = [];
            _loc_12 = [];
            _loc_13 = [];
            _loc_14 = 0;
            while (_loc_14 < _loc_3.length)
            {
                
                _loc_33 = String(_loc_3[_loc_14]).substr(7, 2);
                _loc_34 = int(_loc_33);
                if (_loc_34 <= 10)
                {
                    _loc_6.push(_loc_3[_loc_14]);
                }
                else if (_loc_34 > 10 && _loc_34 <= 20)
                {
                    _loc_7.push(_loc_3[_loc_14]);
                }
                else if (_loc_34 > 20 && _loc_34 <= 30)
                {
                    _loc_8.push(_loc_3[_loc_14]);
                }
                else if (_loc_34 > 30 && _loc_34 <= 40)
                {
                    _loc_9.push(_loc_3[_loc_14]);
                }
                else if (_loc_34 > 40 && _loc_34 <= 50)
                {
                    _loc_10.push(_loc_3[_loc_14]);
                }
                else if (_loc_34 > 50 && _loc_34 <= 60)
                {
                    _loc_11.push(_loc_3[_loc_14]);
                }
                else if (_loc_34 > 60 && _loc_34 <= 70)
                {
                    _loc_12.push(_loc_3[_loc_14]);
                }
                else
                {
                    _loc_13.push(_loc_3[_loc_14]);
                }
                _loc_14++;
            }
            _loc_15 = UserData.getUserData("career");
            _loc_16 = UserData.getBagData();
            _loc_17 = _loc_16.maxcount;
            _loc_18 = 0;
            _loc_19 = 0;
            _loc_20 = 0;
            _loc_21 = 0;
            _loc_22 = 0;
            _loc_23 = 0;
            _loc_24 = 0;
            _loc_25 = 0;
            _loc_27 = 1;
            while (_loc_27 < _loc_17)
            {
                
                _loc_35 = _loc_16[_loc_27];
                if (_loc_35)
                {
                    if (_loc_35[4] && int(_loc_35[4].itemtype) == 2 && int(_loc_35[4].cls) == 14)
                    {
                        _loc_36 = int((_loc_35[4].itemid as String).substr(7, 2));
                        if (_loc_36 <= 10)
                        {
                            if (_loc_15 == 1)
                            {
                                _loc_18 = _loc_18 + ItemUilt.getAllCount(_loc_35[4].itemid);
                            }
                        }
                        else if (_loc_36 > 10 && _loc_36 <= 20)
                        {
                            if (_loc_15 == 2)
                            {
                                _loc_19 = _loc_19 + ItemUilt.getAllCount(_loc_35[4].itemid);
                            }
                        }
                        else if (_loc_36 > 20 && _loc_36 <= 30)
                        {
                            if (_loc_15 == 3)
                            {
                                _loc_20 = _loc_20 + ItemUilt.getAllCount(_loc_35[4].itemid);
                            }
                        }
                        else if (_loc_36 > 30 && _loc_36 <= 40)
                        {
                            _loc_21 = _loc_21 + ItemUilt.getAllCount(_loc_35[4].itemid);
                        }
                        else if (_loc_36 > 40 && _loc_36 <= 50)
                        {
                            _loc_22 = _loc_22 + ItemUilt.getAllCount(_loc_35[4].itemid);
                        }
                        else if (_loc_36 > 50 && _loc_36 <= 60)
                        {
                            _loc_23 = _loc_23 + ItemUilt.getAllCount(_loc_35[4].itemid);
                        }
                        else if (_loc_36 > 60 && _loc_36 <= 70)
                        {
                            _loc_24 = _loc_24 + ItemUilt.getAllCount(_loc_35[4].itemid);
                        }
                        else
                        {
                            _loc_25 = _loc_25 + ItemUilt.getAllCount(_loc_35[4].itemid);
                        }
                    }
                }
                _loc_27++;
            }
            var _loc_28:Array = [];
            _loc_29 = 0;
            if (_loc_18 > 0 && _loc_6.length < (_loc_1 as Array).length)
            {
                _loc_26 = (_loc_1 as Array).length - _loc_6.length;
                if (_loc_18 <= _loc_26)
                {
                    _loc_29 = _loc_29 + _loc_18;
                }
                else
                {
                    _loc_29 = _loc_29 + _loc_26;
                }
            }
            if (_loc_19 > 0 && _loc_7.length < (_loc_1 as Array).length)
            {
                _loc_26 = (_loc_1 as Array).length - _loc_7.length;
                if (_loc_19 <= _loc_26)
                {
                    _loc_29 = _loc_29 + _loc_19;
                }
                else
                {
                    _loc_29 = _loc_29 + _loc_26;
                }
            }
            if (_loc_20 > 0 && _loc_8.length < (_loc_1 as Array).length)
            {
                _loc_26 = (_loc_1 as Array).length - _loc_8.length;
                if (_loc_20 <= _loc_26)
                {
                    _loc_29 = _loc_29 + _loc_20;
                }
                else
                {
                    _loc_29 = _loc_29 + _loc_26;
                }
            }
            if (_loc_21 > 0 && _loc_9.length < (_loc_1 as Array).length)
            {
                _loc_26 = (_loc_1 as Array).length - _loc_9.length;
                if (_loc_21 <= _loc_26)
                {
                    _loc_29 = _loc_29 + _loc_21;
                }
                else
                {
                    _loc_29 = _loc_29 + _loc_26;
                }
            }
            if (_loc_22 > 0 && _loc_10.length < (_loc_1 as Array).length)
            {
                _loc_26 = (_loc_1 as Array).length - _loc_10.length;
                if (_loc_22 <= _loc_26)
                {
                    _loc_29 = _loc_29 + _loc_22;
                }
                else
                {
                    _loc_29 = _loc_29 + _loc_26;
                }
            }
            if (_loc_23 > 0 && _loc_11.length < (_loc_1 as Array).length)
            {
                _loc_26 = (_loc_1 as Array).length - _loc_11.length;
                if (_loc_23 <= _loc_26)
                {
                    _loc_29 = _loc_29 + _loc_23;
                }
                else
                {
                    _loc_29 = _loc_29 + _loc_26;
                }
            }
            if (_loc_24 > 0 && _loc_12.length < (_loc_1 as Array).length)
            {
                _loc_26 = (_loc_1 as Array).length - _loc_12.length;
                if (_loc_24 <= _loc_26)
                {
                    _loc_29 = _loc_29 + _loc_24;
                }
                else
                {
                    _loc_29 = _loc_29 + _loc_26;
                }
            }
            if (_loc_25 > 0 && _loc_13.length < (_loc_1 as Array).length)
            {
                _loc_26 = (_loc_1 as Array).length - _loc_13.length;
                if (_loc_25 <= _loc_26)
                {
                    _loc_29 = _loc_29 + _loc_25;
                }
                else
                {
                    _loc_29 = _loc_29 + _loc_26;
                }
            }
            _loc_30 = UserData.getUserData("level");
            _loc_31 = this._openLevel["role"][4].level;
            if (_loc_30 >= _loc_31 && _loc_29 > 0 && _loc_2 > 0)
            {
                baoshiBox.visible = true;
                baoshiCount.text = "1";
            }
            else
            {
                baoshiBox.visible = false;
            }
            return;
        }// end function

        public function showNeiGongCount(param1:Object) : void
        {
            if (param1 == 0)
            {
                this.neigongGth.visible = false;
            }
            else
            {
                this.neigongGth.visible = true;
            }
            return;
        }// end function

        public static function getBasePow() : int
        {
            var _loc_1:* = ModelProxy.getValue("data", "user");
            var _loc_2:* = _loc_1.level;
            var _loc_3:* = _loc_1.rein;
            var _loc_4:* = _loc_1.career;
            var _loc_5:Number = 0;
            var _loc_6:Number = 0;
            var _loc_7:Number = 0;
            var _loc_8:Number = 0;
            switch(_loc_4)
            {
                case 1:
                {
                    _loc_5 = 1.55;
                    _loc_6 = 0.3;
                    _loc_7 = 132;
                    _loc_8 = (Math.max(1 - (_loc_2 - 1) * 0.008439, 0.3333) + 1) + (_loc_2 - 1) * 2.333 / 79;
                    break;
                }
                case 2:
                {
                    _loc_5 = 0.725;
                    _loc_6 = 1.5;
                    _loc_7 = 105;
                    _loc_8 = (Math.max(1 - (_loc_2 - 1) * 0.008439, 0.3333) + 1) + (_loc_2 - 1) * 0.0211;
                    break;
                }
                case 3:
                {
                    _loc_5 = 1;
                    _loc_6 = 0.9;
                    _loc_7 = 105;
                    _loc_8 = 2;
                    break;
                }
                default:
                {
                    break;
                    break;
                }
            }
            var _loc_9:* = RoleCtrl.int(Math.pow(1.07 - _loc_2 / 4700, _loc_2) * Math.pow(1.12 - _loc_3 / 2000, _loc_3) * _loc_5 * 150) / 5;
            var _loc_10:* = RoleCtrl.int(Math.pow(1.07 - _loc_2 / 4700, _loc_2) * Math.pow(1.12 - _loc_3 / 2000, _loc_3) * _loc_6 * 150) / 15;
            var _loc_11:* = RoleCtrl.int(RoleCtrl.int(Math.pow(1.07 - _loc_2 / 4700, _loc_2) * Math.pow(1.12 - _loc_3 / 2000, _loc_3) * _loc_5 * 150) / 0.25 / 10000 * Math.pow(1000 - _loc_3 * 20, 2) / 1000 / 0.8 / 1.3 * 0.1 * 2 / _loc_5);
            var _loc_12:* = RoleCtrl.int(Math.pow(1.07 - _loc_2 / 4700, _loc_2) * Math.pow(1.12 - _loc_3 / 2000, _loc_3) * _loc_5 * 150 / _loc_5 / 150 * 1.43e-007 * _loc_8 * Math.pow(1000 - _loc_3 * 20, 2));
            var _loc_13:* = RoleCtrl.int(RoleCtrl.int(_loc_2 / 7 + 1 + _loc_3 + 10) * 2 * 0.3) * 30 + RoleCtrl.int(RoleCtrl.int(_loc_2 / 7 + 1 + _loc_3 + 10) * 2 / 0.97 * 0.3) * 30;
            var _loc_14:* = 1 + (_loc_7 - 120) / 200;
            return RoleCtrl.int((_loc_9 + _loc_10 + _loc_11 + _loc_12 + _loc_13) * _loc_14);
        }// end function

    }
}
